The majority of editors use a short cut to uncomment code blocks. To comment out specific lines of code in the default editors, use command or control and a single quote. It's Command or Control+/ in RStudio. Verify with your editor.
They continue to remark line by line, but they also uncomment a few chosen lines. It's command-option for the Mac RGUI (I'm assuming control option for Windows). It's just Command or Control + Shift + C once more for Rstudio.
These shortcuts will probably alter as editors are upgraded and new programmes overtake older ones as the most widely used R editors. Whatever software you use, you'll need to search it up.