[R] import Excel file ?
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Tue Apr 20 17:21:12 CEST 2004
Gabor Grothendieck <ggrothendieck at myway.com> writes:
> Emilie Haon.Lasportes <Emilie.Haon-Lasportes <at> beaulieu.rennes.inra.fr>
> writes:
> > I would like to know how can I import Excel files in R ? Do I have to
> > transform them in text files (.txt) ?
>
> The easiest way for one time use is to select the data in Excel,
> press ctrl-c to copy it to the clipboard and
> then use the following R command:
>
> read.table("clipboard", header=T)
>
> (assuming the first selected line is the header).
If you have empty cells, I rather strongly suspect that you want
read.delim() in there (or read.delim2() for the locale-challenged).
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list