?do.call Second argument is a list of arguments to pass. Try do.call(mean, list(x, na.rm = T))
On Thu, May 12, 2011 at 1:57 PM, John Kerpel <john.ker...@gmail.com> wrote: > Hi all! I need to do something really simple using do.call. > > If I want to call the mean function inside do.call, how do I apply the > condition na.rm=TRUE? > > So, I use do.call(mean, list(x)) where x is my data. This works fine if > there are no NAs. > > Thanks, > > John > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- =============================================== Jon Daily Technician =============================================== #!/usr/bin/env outside # It's great, trust me. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.