aeongrail
aeongrail

Reputation: 1394

Make an R script write lines to the console faster (Rgui)

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)

Upvotes: 1

Views: 348

Answers (1)

Rohit Das
Rohit Das

Reputation: 2042

Best way is to simply source the document. If you have it saved then just type source("FullPathOfmyfile.R") and it will run without printing the commands, it will only print the output and print statements. Alternatively you can set echo = FALSE.

Upvotes: 5

Related Questions