rstudio comment shortcut code example Example: How to add a comment in r Using R Studio, you can do Control+Shift+C, or Command+Shift+C on macOS.