matrix() can't handle NaN (PR#193)
wsi@gcal.ac.uk
wsi@gcal.ac.uk
Tue, 11 May 1999 14:02:01 +0200 (MET DST)
Full_Name: Bill Simpson
Version: 0.64.1
OS: linux
Submission from: (NULL) (193.62.250.209)
Here is the data file:
x y z
1 1 1
1 2 2
2 1 NaN
2 2 4
>data<-read.table("~/junk.dat",header=TRUE)
> data
x y z
1 1 1 1
2 1 2 2
3 2 1 NaN
4 2 2 4
> matrix(data$z,length(y),length(x))
[,1] [,2]
[1,] 1 4
[2,] 2 3
This is not the correct matrix. It seems that NaNs screw up matrix().
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._