[R] setwd and list.files / linux
Marc Schwartz
marc_schwartz at comcast.net
Thu Dec 4 17:58:16 CET 2008
on 12/04/2008 10:38 AM Lars Beckmann wrote:
> Hey,
>
> two questions regarding setwd and list.files:
>
> I try to use the function list.files:
>
>> datapath<-'/nfs/home/m/cremer/gaw/data/traws_chrs'
>
>> fl<-list.files(datapath, pattern="\\.tped")
>
> but I get the following error message:
>
> Warning message:
> In list.files(datapath, pattern = "\\.tped") :
> list.files: '/nfs/home/m/cremer/gaw/data/traws_chrs/' is not a readable directory
>> fl
> character(0)
>
> The use of setwd also does not work:
>
>> setwd(datapath)
> Error in setwd(datapath) : cannot change working directory
>
>
> datapath exists and it doesn't matter whether I use single quotes ' or double quotes "
>
> Any help?
>
> Lars
You do not have read privileges to the path in question. Either you or
your SysAdmin will have to grant the appropriate privileges so that you
can read the files in the path.
HTH,
Marc Schwartz
More information about the R-help
mailing list