I dug in several places for 2 simple needs, but could not find a definitive answer.
I am running an R script in batch mode. Not sure if my solution is the best, but I use R CMD BATCH according to http://stat.ethz.ch/R-manual/R-patched/library/utils/html/BATCH.html included in the bat file .
First, I would like to have a directory in which the R script is saved, configured as a working directory, and not where the bat file is saved.
Secondly, I would like to redirect all the output from the R script (csv files and diagrams) to a specific directory other than the working directory. I can not find any options for such a basic requirement.
The final idea is to be able to run the bat file on different computers no matter where the R script is stored.
thanks
source share