[R] trouble getting R program to open a data file

Roger Peng rpeng at stat.ucla.edu
Tue Jun 18 01:49:14 CEST 2002


On Windows, you need to use "\\" instead of a single "\".  To avoid this
problem in the future (and to be platform independent), you might consider
doing:

DataFile <- file.path("c:", "windows", "desktop", "slope.csv")

which will insert the appropriate directory separator for you.

-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng

On Mon, 17 Jun 2002, Paul Yoder wrote:

> Hi,
> 	We've written an R program to conduct a series of analyses on a data file
> that is a comma separated value file. At one time it worked, but every
> since having down loaded the new version of R, I'm getting the following:
> 
> Cannot open c:windowsdesktopslope.csv
> 
> 
> What I've asked the program to do is to open a datafile using the following: 
> 
> DataFile<- 'c:\windows\desktop\slope.csv' 
> 
>  So it is clearly stripping the "\" from the path. I've tried using "/" to
> no avail. Any suggestions?
> 
> Paul
> Paul J. Yoder, Ph.D.
> Peabody Box 328
> Vanderbilt University
> Nashville, TN 37215
> phone: 615-322-8464
> fax: 615-322-8236
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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