At the moment I have a very simple script. If I type the commands into a console, I have text printing to the screen. However if I run the script using the following
source('myscript.R')
The contents are executed but nothing is printed to the screen. How do I stop console output from being suppressed?
IMHO you need to specify
print.evalparameter set toTRUEif you want to get only the output (and not the commands). If you would need the commands too, you should setechotoTRUE(which implies settingprint.evaltoTRUE).For example:
source('myscript.R', print.eval = TRUE)