Hi, this is my first post to the forums. I heavily comment my code. However, I'd like to suppress #comments appearing in the console when i run a script. I can't find any settings to do this. Is this possible?
Many thanks
Hi, this is my first post to the forums. I heavily comment my code. However, I'd like to suppress #comments appearing in the console when i run a script. I can't find any settings to do this. Is this possible?
Many thanks
Running your whole script with source()
? Depends on your workflow.
It doesn't seem to make a difference whether i run with source or source with echo.
I mean, if you have a script saved as a file called "script.R" on your computer, you can enter an R session and run:
source("script.R")
That can make sense if it's a finished script that prints or saves the relevant results automatically, but it would be useless if you're interactively running parts of the script and just annoyed at seeing the comments in the console.
?source
source("script.R", echo = FALSE)
Also look at ?capture.output()
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.