comment out block in r code example Example 1: r comment # for 1 line of code Example 2: multiple comment code in R Ctrl + Shift + C