Commenting a block of code

I can't believe that I can't find the solution to this miniscule issue. I remember from a course where we used R that we marked a block of comments by marking the beginning and the end of the block. Sadly, I forgot what the combination of characters that were and there's literally no material about this online, incredible! Can you help me with this? To be clear, I'm not looking for the "ctrl+shift+c" shortcut, but it was something like:
comment block
But this doesn't work

that notation is used in other languages, not R and there is no equivalent comment syntax in R where comments are started and stopped. its simply from a hash symbol on to the end of the line. sorry :frowning:

But I'm sure I have used it before! Am I going crazy?? I'll have to dig that stuff out now

any chance you were using rcpp ?

hmm, theres a sort of a hacky approximation.

' not really a comment
but a garbage string that just evaluates and
results in nothing changing in the environment...

No, but nice to know and thanks for the effort! I actually found the files in the mean time. What we used there is #'. It's not exactly what I was looking for but if you use #' R will automatically add another line of comment if you hit enter until you delete it.

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.