[R] How to read an excel data into R?

Petr Pikal petr.pikal at precheza.cz
Thu Jun 23 19:27:47 CEST 2005



On 22 Jun 2005 at 16:46, Ling Jin wrote:

> Hi all,
> 
> Does anybody know the easiest way to import excel data into R? I
> copied and pasted the excel data into a txt file, and tried
> read.table, but R reported that
> 
> Error in read.table("data_support.txt", sep = " ", header = T) :
>          more columns than column names
> 

Or simply

Open Excell file
Decide what you want to copy and put it to clipboard by Ctrl-C
In R issue

temp1<-read.delim("clipboard")

and you have your data in temp1

HTH
Petr





> Thanks!
> 
> Ling
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list