RE: [R] Problems with data.matrix

About this list Date view Thread view Subject view Author view Attachment view

From: Adaikalavan Ramasamy (gisar@nus.edu.sg)
Date: Sat 29 Mar 2003 - 17:53:39 EST


Message-id: <024D6AEFCB92CB47BA1085751D184BB8015FDC9D@MBXSRV03.stf.nus.edu.sg>


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@bayesian-bay.freeserve.co.uk]
Sent: Saturday, March 29, 2003 12:44 AM
To: r-help@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@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:31 EST