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

后端 未结 1 1066
清歌不尽
清歌不尽 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)
提交回复
热议问题