Skip to content

Basic matematical functions with NAs

2 messages · roger bos, Paulo Brando

#
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: