So far I have only been able to comment as follows:
# Mi Comentario 1
# Mi Comentario 2
# Mi Comentario 3
But I would like to know something equivalent to /**/
:
/*
Comentario 1
Comentario 2
Comentario 3
*/
So far I have only been able to comment as follows:
# Mi Comentario 1
# Mi Comentario 2
# Mi Comentario 3
But I would like to know something equivalent to /**/
:
/*
Comentario 1
Comentario 2
Comentario 3
*/
Unfortunately, R does not handle multiline comments , there is a trick, which I don't know if it's very good, and that involves writing a common multiline string, which R will evaluate as such:
In this case, the string written like this is relatively innocuous: it will be seen in the console output and there will be a minimal penalty for evaluating it.
Using R Studio (or Eclipse) you can create comment blocks: Select the text and use the string
Windows:
Ctrl+ Shift+C
either
Ctrl+ ⇧+C
Mac:
Command+ Shift+C
either
⌘+ ⇧+C
Manually just define the blocks using
"
as container, example:Once the text is selected Crtl+ ↑+c
What I do is write everything as if it were a notepad, and then I put all the "#" at once. There is a keyboard shortcut Ctrl+Alt+up or down arrow that extends the text cursor several lines to be able to enter the same character on several lines at once, in this case, "#".
Yes there is way to make multiline comment, using
I hope it works for you.