[R] Importing file from Excel
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Mon Aug 27 09:29:18 CEST 2001
On Sun, 26 Aug 2001, srinivasa raghavan wrote:
> Hi,
>
> I have a basic import problem. I tried to import a
> comma delimited "boston.csv" from C drive and gave the
> following command at R prompt
>
> >read.csv(c:\boston.csv,sep=",",dec=".",fill=TRUE)
> Error: syntax error
>
> can any one help to debugg the code.I am using R
> version 1.3 for windows
(1.3.0 probably.)
You need to
1) quote character strings
2) use \\ for \.
E.g.
read.csv("c:\\boston.csv",sep=",",dec=".",fill=TRUE)
and as all the other arguments are the defaults, just
read.csv("c:\\boston.csv")
is equivalent.
>
> with regards
>
> srinivas
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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