

--- Prof Brian D Ripley <ripley@stats.ox.ac.uk> wrote:
>A matrix list?  R lists are just vectors with elements of different types,
>and R matrices are just vectors with a dimension attribute.

When I saw the above I tried to create a matrix from a list but
could not get it to work:

 my.lm <- lm( rnorm(10) ~ I(1:10) )
 my.list <- list(1, 2, 3, 4, 5, 6, my.lm, my.lm, my.lm)
 my.mat <- matrix( my.list, nrow=3 )

gives the following error in R 1.4.0 on Windows 2000:

 Error in matrix(my.list, nrow = 3) : Unimplemented feature in  
  copyVector

Is there a way to create a matrix out of elements of different types?

Thanks.


_____________________________________________________________


_____________________________________________________________
You deserve a better email address! Get personalized email @yourname
or @yourcompany from Everyone.net --> http://www.everyone.net?tag
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

