Overall RStudio tips

This post includes some overall tips for R/RStudio that are simple yet very helpful.

Code

  • To run a line of code (and its associated connected lines):
    • on mac: command + return
    • on windows: Ctrl + return
  • To fix code indentation:
    • on mac: command + a to select all, then command + i
    • on windows: Ctrl + a to select all, then Ctrl + i

RStudio Projects

  • To go to project main folder, click on the blue R icon in the Files tab.

  • To open a folder on your computer file explorer, click on the More icon next to an engine in the Files tab, and select “Show Folder in New Window”.

  • To show chunk names on the table of contents, go to

    Tools > Global Options > R markdown > Show in document outline > Sections and Named Chunks

Previous