Is there a way to turn off/on echoing to the R console (without using source()
?)
For example, let's say I have a long .R script and I wish to run only one line from it. Say that line is x <- 9
.
In RStudio, I can go to the line in question and use the "Run Selected Line(s)" command from the "Code" menu (or keyboard shortcut ctrl-enter on my PC). What'll happen upon doing that is it the console will print x <- 9
(and then obviously, R will create a variable called x
and assign it the value 9
).
Is there a way to not have this line echoed in the console (but still create the variable)?
The reason I ask is that I have lengthy lines of code that just define functions and every time I want to update a function, it echoes the whole thing to the console, and that burns a lot of time.
Thanks.