Skip to content
Prev 163897 / 398506 Next

Running R Script on a Sequence of Files

Me neither.
That's what I would use, too. If the OP is on a UNIX platform,
run the R-script in a loop in the shell is an alternative.
Something like this (bourne shell syntax):

for datafile in *.csv ; do
	Rscript analyze.R $datafile
done

The R script (analyze.R) can use commandArgs() to read the filename
argument.

cu
	Philipp