Simple question about comment code aesthetics (color):
I recently noticed in someone's comment code that part of their comment color changed while using the @ symbol. After experimenting with it, I noticed you also need to have an apostrophe (') right after the octothorp (#) as such:
#' @text
^--- This turned orange!
Since I'm a detailed commenter, I'd love to step things up if I could by adding color to my comments. I know part of the reason is my global IDE (RStudio) options, but I'd never seen anything change a comment's color before, so I was just curious:
- Why does this occur? I've only seen
@used when handling large, more-complex objects that need further specification => Ex.LargeObject@data$variable - Are there other symbols that trigger a color change? There's quotes of course (
""), but quotes do not change color when they're commented out with an octothorp (#). - Also, on the image (bottom row), is there possibly a way to start and end a comment, followed by a command, all on one line? => Ex.
#comment# print(summary(df))
