[R] min(NA,"bla") != min("bla", NA)
Magnus Thor Torfason
zulutime.net at gmail.com
Thu Sep 26 17:07:16 CEST 2013
Just ran these two statements:
> min(NA,"bla")
[1] NA
> min("bla", NA)
[1] "bla"
And then reran with explicit na.rm=FALSE
> min(NA,"bla", na.rm=FALSE)
[1] NA
> min("bla", NA, na.rm=FALSE)
[1] "bla"
That seems wrong. Would this be considered a bug or is there a way to
explain these results in a different way?
Best,
Magnus
ps. Tested on R 3.0.1, 32 bit for Windows (as well as some older versions)
More information about the R-help
mailing list