Richard M. Heiberger
2006-May-09 02:00 UTC
[R] Fwd: Re: read.table (Error in file(file, "r") : unable to open connection)
or use forward slashes, exactly the same as in Unix. This has the advantage of being portable, especially if you make it relative to a starting directory. read.table("c:/a/b/c.dat") read.table("c:\\a\\b\\c.dat") ---- Original message ---->Date: Tue, 9 May 2006 09:42:03 +0800 >From: ronggui <ronggui.huang at gmail.com> >Subject: Re: [R] read.table (Error in file(file, "r") : unable to open connection) >To: "David.Lowery at csiro.au" <David.Lowery at csiro.au> >Cc: r-help at stat.math.ethz.ch > >I guess you use R under windows,then use \\ instead of \. > >or use file.choose() to choose the file directly. >
Prof Brian Ripley
2006-May-09 08:00 UTC
[R] Fwd: Re: read.table (Error in file(file, "r") : unable to open connection)
Folks, This two FAQs: FAQ Q7.8 rw-FAQ Q2.16 Referring enquirers to the FAQs allows readers to see the full arguments rather than getting partial info into the list archives. On Mon, 8 May 2006, Richard M. Heiberger wrote:> or use forward slashes, exactly the same as in Unix. This has the advantage > of being portable, especially if you make it relative to a starting directory. > > read.table("c:/a/b/c.dat") > read.table("c:\\a\\b\\c.dat") > ---- Original message ---- >> Date: Tue, 9 May 2006 09:42:03 +0800 >> From: ronggui <ronggui.huang at gmail.com> >> Subject: Re: [R] read.table (Error in file(file, "r") : unable to open connection) >> To: "David.Lowery at csiro.au" <David.Lowery at csiro.au> >> Cc: r-help at stat.math.ethz.ch >> >> I guess you use R under windows,then use \\ instead of \. >> >> or use file.choose() to choose the file directly. >> > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >-- 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 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595