File: remove-missing-yz.rd

package info (click to toggle)
r-cran-ggplot2 0.8.9-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,084 kB
  • sloc: makefile: 3
file content (25 lines) | stat: -rw-r--r-- 930 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
\name{remove_missing}
\alias{remove_missing}
\title{Convenience function to remove missing values from a data.frame}
\author{Hadley Wickham <h.wickham@gmail.com>}

\description{
Remove all non-complete rows, with a warning if \code{na.rm = FALSE}.
}
\usage{remove_missing(df, na.rm=FALSE, vars = names(df), name="")}
\arguments{
\item{df}{data.frame}
\item{na.rm}{suppress warning that rows are being removed?}
\item{vars}{optional function name to make warning message more informative}
\item{name}{}
}

\details{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 \code{na.rm = TRUE} is supplied
to the statistic, the warning will be suppressed.}

\examples{a <- remove_missing(movies)
a <- remove_missing(movies, na.rm = TRUE)
qplot(mpaa, budget, data=movies, geom="boxplot")}
\keyword{internal}