reading excel into R

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

reading excel into R

cheba meier
Dear all,

I am new R user and I am sure that this question has been asked quite often
and I have also googled it and read about it! I understood that in order to
read excel sheet into R you need to open it and saved it as csv or text, is
this true? or you can use read.delim2 and read.csv2 to do this without the
following error

> dat <- read.csv2(file="C:\\Dokumente und
Einstellungen\\Cheba\\Desktop\\Rtemp\\ Results2010.xls",header = TRUE)
Warnmeldung:
In read.table(file = file, header = header, sep = sep, quote = quote,  :
  unvollständige letzte Zeile von readTableHeader gefunden in 'C:\\Dokumente
und Einstellungen\\Cheba\\Desktop\\Rtemp\\ Results2010.xls'
> dat
[1] ÐÏ.à..
<0 Zeilen> (oder row.names mit Länge 0)

Thes same error I get when I use read.delim and demlim2!

Is library(gdata) the solution?

Sorry for any inconvenience caused.

Regards,
Cheba

        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: reading excel into R

milton ruser
Dear Cheba

Please, install the package "xlsReadWrite"
I suppose that read.csv is to read csv files, not xls ones.

cheers

milton

On Thu, Apr 1, 2010 at 6:19 AM, cheba meier <[hidden email]>wrote:

> Dear all,
>
> I am new R user and I am sure that this question has been asked quite often
> and I have also googled it and read about it! I understood that in order to
> read excel sheet into R you need to open it and saved it as csv or text, is
> this true? or you can use read.delim2 and read.csv2 to do this without the
> following error
>
> > dat <- read.csv2(file="C:\\Dokumente und
> Einstellungen\\Cheba\\Desktop\\Rtemp\\ Results2010.xls",header = TRUE)
> Warnmeldung:
> In read.table(file = file, header = header, sep = sep, quote = quote,  :
>  unvollständige letzte Zeile von readTableHeader gefunden in 'C:\\Dokumente
> und Einstellungen\\Cheba\\Desktop\\Rtemp\\ Results2010.xls'
> > dat
> [1] ÐÏ.à..
> <0 Zeilen> (oder row.names mit Länge 0)
>
> Thes same error I get when I use read.delim and demlim2!
>
> Is library(gdata) the solution?
>
> Sorry for any inconvenience caused.
>
> Regards,
> Cheba
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> [hidden email] 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.
>
>
        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: reading excel into R

Gabor Grothendieck
In reply to this post by cheba meier
See this link for a number of alternatives:

http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows

On Thu, Apr 1, 2010 at 6:19 AM, cheba meier <[hidden email]> wrote:

> Dear all,
>
> I am new R user and I am sure that this question has been asked quite often
> and I have also googled it and read about it! I understood that in order to
> read excel sheet into R you need to open it and saved it as csv or text, is
> this true? or you can use read.delim2 and read.csv2 to do this without the
> following error
>
>> dat <- read.csv2(file="C:\\Dokumente und
> Einstellungen\\Cheba\\Desktop\\Rtemp\\ Results2010.xls",header = TRUE)
> Warnmeldung:
> In read.table(file = file, header = header, sep = sep, quote = quote,  :
>  unvollständige letzte Zeile von readTableHeader gefunden in 'C:\\Dokumente
> und Einstellungen\\Cheba\\Desktop\\Rtemp\\ Results2010.xls'
>> dat
> [1] ÐÏ.à..
> <0 Zeilen> (oder row.names mit Länge 0)
>
> Thes same error I get when I use read.delim and demlim2!
>
> Is library(gdata) the solution?
>
> Sorry for any inconvenience caused.
>
> Regards,
> Cheba
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> [hidden email] 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.
>
>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: reading excel into R

Ravi Kulkarni
Use R Commander to do this. R Commander is a R package that offers a GUI for R. It can be downloaded like any other R package.

If you use R Commander, there is a menu option where you specify that you want to read an Excel file (you can also read text, SPSS, Minitab, Stata, Access... files). It is very easy to use!

R Commander also lets you do some statistical tests through the GUI.



Ravi