[R] missing values

Chuck Cleland ccleland at optonline.net
Thu Jun 27 10:33:35 CEST 2002

Ulrich Leopold wrote:
> how can I exclude the missing values in the following example:
> tapply(lsk0t50$Pox2, lsk0t50$ProfN, sum)

tapply(lsk0t50$Pox2, lsk0t50$ProfN, function(x){sum(na.omit(x))})

Hope it helps,

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list