How To Make Multiple Lines Annotation In R, Bash
It is annoying to add "#" one line by one line. I am looking some commands like =pod =cut in perl.
• 6,542 views
•
link
1 answer
Neither R nor Bash have block comments. You can fake them, though:
For Bash:
<<'END'
comments go here
and here
END
http://www.unix.com/shell-programming-scripting/39478-block-comment-shell-script.html
For R:
if(FALSE){'
print("This line will not get printed")
this isn't even code
#but that is okay
'}
http://r.789695.n4.nabble.com/R-Block-comments-in-R-td809283.html
(Note: If your R code to be commented out contains a single quote ('), use double quotes for the top & bottom instead. If it contains both, you can omit the quote character as long as the stuff inside the block has valid syntax.)
• 0 views
•
link
Log in to answer this question.
This is a basic programming question, not bioinformatics-related, better asked at stackoverflow.com. Closing as off-topic.
A good text editor will let you highlight a section then comment all of it's lines with one command. I certainly use this all the time in emacs.