How can I run an 'R' script without suppressing output?

后端 未结 1 1055
清歌不尽
清歌不尽 2020-12-05 15:52

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

相关标签:
1条回答
  • 2020-12-05 16:45

    IMHO you need to specify print.eval parameter set to TRUE if you want to get only the output (and not the commands). If you would need the commands too, you should set echo to TRUE (which implies setting print.eval to TRUE).

    For example:

    source('myscript.R', print.eval = TRUE)

    0 讨论(0)
提交回复
热议问题