I want to run an R-script from the command line (on a Linux machine) and store the results in a subdirectory of the working directory. It looks like that:
./myscript.r [param 1] [param 2] [param 3]
Given 3 binomial parameters there are 4 conditions in total. I want to store the results of each condition in a subdirectory of the working directory.
Is there an elegant way to do that or do I really need to copy my R-script to every subdirectory?
save
,write.csv
, etc.? You can create new directories from R using thesystem
command. – Extortionfor
loop for each parameter? – Marrero