[R] apply

Petr Pikal petr.pikal at precheza.cz
Thu Apr 7 16:22:55 CEST 2005


On 7 Apr 2005 at 14:27, malte wrote:

> Hi,
> 
> simple question I guess:
> 
> the following line works well:
> 
> aveBehav=c(apply(sdata, 2, mean))

Hallo
 try

aveBehav=c(apply(sdata, 2, mean, na.rm=T))

Cheers
Petr


> 
> However, I would like to pass an argument to the function mean,
> namely na.rm=TRUE
> 
> Does anyone knows how to do this?
> 
> Thanks in advance,
> 
> Jan
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list