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:[EMAIL PROTECTED] Sent: Saturday, March 29, 2003 12:44 AM To: [EMAIL PROTECTED] 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 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
