Search code examples
rbatch-filebatch-processingrscript

The R script must not set the working directory -- What does this mean ?


I am running R in batch mode using Rwui to display visual contents.

In the last section of this document: http://sysbio.mrc-bsu.cam.ac.uk/Rwui/tutorial/Technical_Report.pdf, it is said that the "The R script must not set the working directory" -
I don't understand what they do mean by that. I have checked the help but it's still obscure for me. Could someone briefly explain me what this sentence means?

I checked my R script and it seems to create a directory. setwd("a path").


Solution

  • I would take it to mean that your script should not set a working directory. You probably need to remove the setwd() command and instead read in your files using the full path as the filename