[R] how to import data from excel to R

David Winsemius dwinsemius at comcast.net
Thu Dec 17 19:35:56 CET 2009

On Dec 17, 2009, at 11:24 AM, sta_2279 at spectrum.net.in wrote:

> Hi,
>   I am using R and I want to know how data can be transferred from  
> Excel
> Spread sheet to R for analyzing. I have done like this
> mydata<-read.table("C:\Documents and Settings\admin\Desktop 
> \data.txt");
> but its not working how can i do it

You've gotten three distinct suggestions, all of which are probably  
needed and none of which would completely fill in the missing aspects  
of your R-knowledge needed for success:

a) reading xls formatted files is possible with quite a few special  
functions possibly requiring importing packages.
b) reading exported tab or comma delimited files is possible.
c) your file specification would not have succeeded.
d) you did not report the full error message which suggests the you  
should now read the Posting Guide more thoroughly.
e) you should read the documentation in the Import Export Manual.  
(This is probably also illustrated in several of the introductory  
manuals, and we expect you to read at least one before posting  

Do some homework and then you should have an increase in your store of  


>                                                      regards
>                                                    Sarath Sankar V
>                                               Spectrum Softtech  
> Solution
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list