[R] notes on specifying paths and file extensions in Windows; was: (no subject)

Uwe Ligges ligges at statistik.uni-dortmund.de
Wed Jul 14 16:57:38 CEST 2004


Duncan Murdoch wrote:

> On Wed, 14 Jul 2004 10:11:30 -0400, Vincent Goulet
> <vincent.goulet at act.ulaval.ca> wrote :
> 
> 
>>Hi,
>>
>>I but you left out the extension that Windows is hiding from you.
> 
> 
> Yes indeed!  Why Windows hides extensions has never made any sense to
> me.  To turn off this seriously broken behaviour, open a folder, then
> in the Tools|Folder Options dialog, find "Hide extensions for known
> file types" and make sure it is not checked.  In Win XP it's under the
> View tab, around 10 lines down; I think it's in other places in other
> versions.

In particular, the path for sure does not realy start with "/Desktop"...

You might want to try
   dir(file.path(Sys.getenv("USERPROFILE"), "Desktop/work"))
and correct the entry to
   read.table(file.path(Sys.getenv("USERPROFILE"), 
"Desktop/work/128_L.YourExtension"))

Uwe Ligges

BTW: I wonder why nobody uses a sensible subject in this thread....



> Duncan Murdoch
> 
> 
>>Vincent
>>
>>On Wednesday 14 July 2004 10:02, Herman, David (NIH/NIMH) wrote:
>>
>>>Hello,
>>>            I'm new to R, and I'm having trouble importing a text file (I'm
>>>on Windows XP)
>>>
>>>
>>>> m <- read.table("/Desktop/work/128_L")
>>>
>>>Error in file(file, "r") : unable to open connection
>>>In addition: Warning message:
>>>cannot open file `/Desktop/work/128_L'
>>>
>>>
>>>do you know why this isn't working?  All I have is a bunch of text files,
>>>each with a single column of about 30,000 rows.
>>>
>>>thanks
>>>
>>>	[[alternative HTML version deleted]]
>>>
>>>______________________________________________
>>>R-help at 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
> 
> 
> ______________________________________________
> R-help at 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




More information about the R-help mailing list