[R] unable to open connection

Duncan Murdoch murdoch at stats.uwo.ca
Thu Apr 13 00:03:08 CEST 2006


Fred J. wrote:
> Duncan
>  what does the permission needs to look like in your opinion?
>  the way it is now, on both the data file and the R batch file "r.R"
>  seem to have all the read permission there is, for the user, group and
>  others, unless you wanted to say write permission for group and others
>  which are the only lacking from what I see from -rwxr-xr-x

I don't think there is any problem with r.R.  The problem appears to be 
in one of the commands that is contained in it, where it tries to open
data/pathtofile/041006 but that file does not appear to exist.

My guess is that the data directory lies below your home directory, but 
your working directory is /home/fred/R so it is looking for it in the 
wrong place.

Duncan Murdoch

>  
> Duncan Murdoch <murdoch at stats.uwo.ca> wrote: On 4/12/2006 12:40 PM, Fred J. wrote:
> 
>>Dear R users
>> 
>> I am having a problem "unable to open connection" and don't know why.
>> using debian testing, R Version 2.2.1
>> 
>>  fred at debian:~/R$ ls -l
>>  -rwxr-xr-x 1 fred fred  11599 2006-04-13 02:12 r.R
>> 
>> ****************************************************************
>> > getwd() 
>> [1] "/home/fred/R"
>> > source("r.R")
>> Error in file(file, "r") : unable to open connection
>> In addition: Warning message:
>> cannot open file 'data/pathtofile/041006', reason 'No such file or directory' 
>> ****************************************************************
> 
> 
> Does /home/fred/R/data/pathtofile/041006 exist, and do you have read 
> permission on it?  It doesn't look like it, from the ls above.
> 
> Duncan Murdoch
> 
> 
> 		
> ---------------------------------
> Blab-away for as little as 1¢/min. Make  PC-to-Phone Calls using Yahoo! Messenger with Voice.




More information about the R-help mailing list