[R] Problems with data.matrix
Adaikalavan Ramasamy
gisar at nus.edu.sg
Sat Mar 29 07:53:39 CET 2003
unlist() ...
x <- list(NULL)
x <- list( c(1,2), c(3,4), c(5,6), c(7,8) )
y <- unlist(x)
z <- matrix( y, nrow=2 )
-----Original Message-----
From: Laura Gross [mailto:laura at bayesian-bay.freeserve.co.uk]
Sent: Saturday, March 29, 2003 12:44 AM
To: r-help at stat.math.ethz.ch
Subject: [R] Problems with data.matrix
Dear List
I have what is probably a simple problem that I just can't seem to
solve.
I have a data list which is in the form: lev2.list
[[1]]
1 2
number number
[[2]]
3 4
number number
etc down to [[1100]]
I'm wanting to convert this to a data.matrix so I can plot the values,
however, when I use new<-data.matrix(lev2.list), I get a data matrix
that reads:
[1, ] Numeric, 2
[2, ] Numeric, 2
with every line down to [1100, ] reading 'Numeric,2'
Why am I getting this output? Why will R not display the numbers in a
data.matrix?
Many thanks for any help
Laura
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list