I am using Ubuntu 14.04. I like to run R scripts from the terminal (bash) using the command Rscript
. I like to redirect my output to a file, for example:
Rscript some_R_code.R > output.log &
(I like to run it in the background, which is why I use &).
And, indeed, 99% of the output does go to that file. But I do get the odd little messages which do not. For example:
Warning message:
replacing previous import ‘getCall’ when loading ‘fBasics’
is outputted to the terminal, when I want it to the file.
What is causing this, and how do I fix it?