Capturing Rscript errors in an output file Capturing Rscript errors in an output file r r

Capturing Rscript errors in an output file


Rscript --no-save --no-restore --verbose myRfile.R > outputFile.Rout 2> errorFile.Rout

To put the output and error in the same file (assuming sh/bash)

Rscript --no-save --no-restore --verbose myRfile.R > outputFile.Rout 2>&1