[R] do.call and applying na.rm=TRUE

From: John Kerpel <john.kerpel_at_gmail.com>
Date: Thu, 12 May 2011 12:57:15 -0500


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_at_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. Received on Thu 12 May 2011 - 18:04:55 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 12 May 2011 - 18:30:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive