Please update your R version (as requested by the posting guide) and
repeat. On my version:

> min(c(NA,"b"))
[1] NA

> min(c("b",NA))
[1] NA

Note that ?min specifically states:

"If na.rm is FALSE [the default - BG] an NA value in any of the arguments
will cause a value of NA to be returned, otherwise NA values are ignored."

Cheers,
Bert


On Thu, Sep 26, 2013 at 8:07 AM, Magnus Thor Torfason <
zulutime.net@gmail.com> 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"
>
>
> 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)
>
> ______________________________**________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
> PLEASE do read the posting guide http://www.R-project.org/**
> posting-guide.html <http://www.R-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

	[[alternative HTML version deleted]]

