remove_missing {ggplot2} | R Documentation |
Remove all non-complete rows, with a warning if na.rm = FALSE
.
remove_missing(df, na.rm=FALSE, vars = names(df), name="")
df |
data.frame |
na.rm |
suppress warning that rows are being removed? |
vars |
optional function name to make warning message more informative |
name |
ggplot is somewhat more accomodating of missing values than R generally.
For those stats which require complete data, missing values will be
automatically removed with a warning. If na.rm = TRUE
is supplied
to the statistic, the warning will be suppressed.
Hadley Wickham <h.wickham@gmail.com>
a <- remove_missing(movies) a <- remove_missing(movies, na.rm = TRUE) qplot(mpaa, budget, data=movies, geom="boxplot")