[R] sum(..., na.rm=TRUE) oddity
B.Rowlingson at lancaster.ac.uk
Mon Apr 28 13:28:32 CEST 2003
rohan sadler wrote:
> This is one of the cases where I can answer my own foolishness. If I
> don't define the switch as na.rm=TRUE, but instead just as TRUE - which
> is my usual practice with other functions - then sum counts the TRUE as
> another vector object, and counts it as one. So much for saving keystrokes.
Are you certain you typed 'na.rm'? I have occasionally typed 'rm.na'
instead, and something like that might explain things:
More information about the R-help