Skip to content
Prev 70293 / 398506 Next

Basic matematical functions with NAs

Simple, all those functions, such as sum(), colSums(), colMeans(),
etc. have an argument called na.rm which you can set to TRUE to remove
NAs.

so try something like sum(X, na.rm=TRUE)


HTH,

Roger
On 5/24/05, Paulo Brando <pmbrando at ipam.org.br> wrote: