[R] Doubt

Agustin Lobo alobo at ija.csic.es
Mon Nov 12 23:29:09 CET 2001

I use to save the data in Excell as ascii text 
with cols separated by spaces. Then, in R, I use
scan (although there are now more sophisticated
functions). For example, if your data matrix is
10cols x 1000 rows, you save it as a file text and then
import it to R with:

mydatain <- scan(matrix("path_and_filename"),byrow=T,ncol=10)

Then you can copy the names of the col.  variables to 
another text file and:

mynames <- scan("path_and_file_name",what="")

dimnames(mydatain) <- list(NA,mynames)

And an analogous procedure for the row names.

Hope it helps!


Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es

On Mon, 12 Nov 2001, Gep wrote:

> As to call files of another softwares(as, Excel, minitab)  
>  to be manipulated inside of R-plus?
> Respectfully
> Regiane

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 at stat.math.ethz.ch

More information about the R-help mailing list