
--- Prof Brian D Ripley <ripley@stats.ox.ac.uk> wrote:
>On Mon, 25 Feb 2002, Gabor Grothendieck wrote:
>> Is there a way to create a matrix out of elements of different types?
>
>> dim(my.list) <- c(3,3)
>> my.list
>     [,1]        [,2]        [,3]
>[1,] "Numeric,1" "Numeric,1" "List,12"
>[2,] "Numeric,1" "Numeric,1" "List,12"
>[3,] "Numeric,1" "Numeric,1" "List,12"
>
>`R matrices are just vectors with a dimension attribute' should have given
>you a clue!

Actually I had tried

my.list$dim <- c(3,3)

but that did not seem to work.  

This gives rise to a number of questions since things appear to work
a bit different than my previous conception of them:

- what is the difference between my.list$dim<- and dim(my.list)<- ?

- after creating the matrix with both numbers and my.lm elements in it
  I tried to convert it to a data frame.  I tried data.frame(my.mat)
  and as.data.frame(my.mat) but using R 1.4.0 on Windows 2000 I got
Error in format(unlist(x), trim = trim) : first argument must be atomic
  for both.  Is it possible to convert my.mat to a data frame?

_____________________________________________________________


_____________________________________________________________
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

