[R] How to import data as numeric array?

tong wang wangtong at usc.edu
Tue Jun 28 10:05:23 CEST 2005


Did some search but couldn't find useful result.

I am trying to read a n*m dimension data with read.table,  what i need is a numeric array, 
is there any efficient way to allow me get this array directly instead of a list? 
I tried to use as.array() to change the mode, but seems it doesn't work and i got this error message:

"Error in "dimnames<-.data.frame"(`*tmp*`, value = list(function (M)  : 
        invalid dimnames given for data frame "
 
what's wrong with the dimension names , should i delete them? how can i do that?

Thanks a lot for any help.

tong wang




More information about the R-help mailing list