[R] spreadsheet data import

Sven Garbade garbade at psy.uni-muenchen.de
Fri Apr 26 17:38:54 CEST 2002

Tomás Revilla wrote:

> Hi colleages!
> I want to import data from ms-excel and other spreadsheet formats (lotus, etc). Does exist any way to do it within
> R? The main problem is that many spreadsheet data use comma as decimal separator and not the point as needed in R
> (and many software for Linux), so importing data first as a tab separated values does not solve this problem.
> Thanks,
>         Tomás Revilla


you can substitute the comma with a point in almost any editor (I think Notepad cannot...)  or use sed/Perl/awk etc
or R (R can read the data as character vectors and then use gsub to find the commas and replace them, transform the
data to a matrix or data frame).

Hope this helps,

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list