From tlumley@u.washington.edu  Wed Oct  9 22:21:11 2002
From: tlumley@u.washington.edu (Thomas Lumley)
Date: Wed, 9 Oct 2002 14:21:11 -0700 (PDT)
Subject: problems with missing values created by conversion using as.matri
 (PR#2130)
In-Reply-To: <200210091654.SAA07998@pubhealth.ku.dk>
Message-ID: <Pine.A41.4.44.0210091418100.64022-100000@homer13.u.washington.edu>

On Wed, 9 Oct 2002 gregory_r_warnes@groton.pfizer.com wrote:
> ------------------------------
>
> Create a very simple data frame containing an factor and a character vector
> each containing a missing value:
>
> 	> x <- data.frame( a=c("",NA), b=c(1,NA) )
>
> Conversion to a matrix treats the two missing values differently:
>

Yes, as.matrix.data.frame() uses format() to make character strings, and
it needs to check for NA as well

	-thomas


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


problems with missing values created by conversion using as.matri (PR#2130)
Thomas Lumley