[R] min(NA,"bla") != min("bla", NA)
Duncan Murdoch
murdoch.duncan at gmail.com
Thu Sep 26 19:55:27 CEST 2013
On 26/09/2013 11:07 AM, Magnus Thor Torfason wrote:
> 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"
This should be all fixed now (at least for min and max; it's possible
some of the other summary functions still have oddities). It's in
R-devel, soon r-patched. All of the above examples should now give a
character NA.
Duncan Murdoch
More information about the R-help
mailing list