Assuming your script is named "myScript.r", you can use something like source("myScript.r", echo = TRUE) to run the entire script.
source("myScript.r", echo = TRUE)
1.4m articles
1.4m replys
5 comments
57.0k users