Re: [R] reading text file in Windows (was no subject)

From: Gabor Grothendieck <ggrothendieck_at_myway.com>
Date: Thu 15 Jul 2004 - 03:03:43 EST

John Fox <jfox <at> mcmaster.ca> writes:

> You got several useful suggestions for what you may have done wrong. I often
> find that it's easier to use read.table(file.choose()) and to navigate to
> the file in the resulting dialog than to type the path to the file.

Related to this, you could issue the command exactly as shown without any arguments at all:

  file.choose()

from the R console, navigate to the correct file and it will return the correct text representation of the filename to use in your read.table.

For example, below I navigated to the AUTHORS file in the rw1091 R distribution:

   R> file.choose()
   [1] "C:\\Program Files\\R\\rw1091\\AUTHORS"

This should help you decipher whether you got the path wrong, the filename wrong, etc.



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 15 03:20:50 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:54:58 EST