Re: [R] How to import data as numeric array?

From: ronggui <>
Date: Tue 28 Jun 2005 - 18:44:35 EST

maybe you can use the array function,like
and matrix is just a specif type of array,so maybe you can use as.matrix

the above tow,the CO2 is a data.frame which can use read.table to read in.

the third way is:use the scan the read the data and use array to change the data to array.

On Tue, 28 Jun 2005 01:05:23 -0700
tong wang <> wrote:

> 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<"(`*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
> ______________________________________________
> mailing list
> PLEASE do read the posting guide!

Department of Sociology
Fudan University,Shanghai

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Tue Jun 28 20:00:24 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:03 EST