[R] Import data from Excel to R

Kevin Wright kw.stat at gmail.com
Wed Sep 10 17:10:43 CEST 2014


Most of the time I would agree with csv being the best format.  _If_ you
are dealing with plain ASCII text.

Having spent most of yesterday with an Excel spreadsheet containing Russian
letters, I can say it is quite difficult to export the data to Unicode
UTF-16 tab-delimited text and then successfully import it to R.  At least
on Windows.  Maybe dependent upon the locale as well. (Google around on
this topic and you find some people seem to be able to succeed at this
task, but at least some other people have had problems.)

What did seem to work reliably for Unicode-containing spreadsheets was to
use the XLConnect package and read the xlsx file directly.

Kevin Wright


On Wed, Sep 10, 2014 at 3:51 AM, Omar André Gonzáles Díaz <
oma.gonzales at gmail.com> wrote:

> The best way is to save the file as CSV... after you can simply import it
> with this comand in R:
>
> read.csv(...) ... to know more about the read.csv comand use in R this:
> ?read.csv.
>
> There are other packages to import EXCEL FILES, but the simplest way, its
> importing this as CSV.
>
> 2014-09-09 18:03 GMT-05:00 Gabor Grothendieck <ggrothendieck at gmail.com>:
>
> > On Tue, Sep 9, 2014 at 4:48 PM, JAWADI Fredj <fredj.jawadi at france-bs.com
> >
> > wrote:
> > > Hi
> > > I am a New user of R.
> > > Please, how to import data from Excel to R?
> > > Thanks,
> > > Best regards,
> > > Fredj,
> > >
> >
> > There are some ways listed here:
> >
> >
> https://web.archive.org/web/20131109195709/http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows&s=excel
> >
> >
> > --
> > Statistics & Software Consulting
> > GKX Group, GKX Associates Inc.
> > tel: 1-877-GKX-GROUP
> > email: ggrothendieck at gmail.com
> >
> > ______________________________________________
> > 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.
> >
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
Kevin Wright

	[[alternative HTML version deleted]]



More information about the R-help mailing list