You can insert sections using CTRL
+SHIFT
+R
(Cmd
+Shift
+R
on the Mac)
For more detail, see Code Folding and Sections
Code Folding RStudio supports both automatic and user-defined folding for regions of code. Code folding allows you to easily show and hide blocks of code to make it easier to navigate your source file and focus on the coding task at hand.
...
To navigate between code sections you can use the Jump To menu available at the bottom of the editor: