1

I've written quite a large R script (1000+ lines). Currently there is a rm(list=ls()) statement at the top of the script, as I need to test how it runs cleanly.

I run the code by ctrl + A, ctrl + R The problem is is that this seems to take a long time in the Rgui to write each line to the console before running it. I feel R should be able to write to the the console faster than this and was wondering if there is a faster way to run a script.

(ie hide the lines written to the console and just run the script)

4

1 回答 1

5

最好的方法是简单地获取文档。如果你保存了它,那么只需键入source("FullPathOfmyfile.R")它就会运行而不打印命令,它只会打印输出和打印语句。或者,您可以设置echo = FALSE.

于 2015-02-13T03:57:17.783 回答