Skip to content
Prev 163822 / 398506 Next

setwd and list.files / linux

Hey Marc,

sorry I forgot to mention it. I am the owner of the path, which is in my home directory. I can change the read/write/execute privileges.  All users have - at least - read privileges for all files and the directory:

hpc36 40: ls -la *.tped
-rw-r--r--  1 cremer C020 205487231 Dec  3 17:35 chr10.tped
-rw-r--r--  1 cremer C020 192067641 Dec  3 17:37 chr11.tped
-rw-r--r--  1 cremer C020 192243483 Dec  3 17:38 chr12.tped

etc
 
A workaround I found now is to start R in the respective directory from the command line, which will set working directory to current directory. list.files will work then too:

list.file(".",pattern="\\.tped")

The problem now is to start a script via R CMD BATCH from a different directory, because setwd() will not work:
[1] "/nfs/home/m/cremer/gaw/code/plink"
Error in setwd(datapath) : cannot change working directory
Execution halted
   
Lars

-------- Original-Nachricht --------