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

2005-06-28 Thread Prof Brian Ripley
Please consult the `R Data Import/Export Manual'. You could be using scan(), as in matrix(scan(some_file, 0), nrow=n, byrow=TRUE) On Tue, 28 Jun 2005, 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

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

2005-06-28 Thread ronggui
maybe you can use the array function,like array(CO2,dim(CO2),list(rownames(CO2),colnames(CO2))) and matrix is just a specif type of array,so maybe you can use as.matrix as.matrix(CO2) 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