R studio shortcuts

I love keyboard shortcuts. I work in R studio and using keyboard shortcuts has saved me a lot of time. There is a full list of short cuts here and I have pulled together my three most used shortcuts.

  1. Ctrl+enter or cmd+enter (Mac) will run the command where the cursor is and then move the cursor down. This is perfect for when you want to run your code line by line.
  2. Ctrl+shift+m or cmd+shift+m (Mac) will insert a pipe (if you don’t already use pipes then you can learn more here)
  3. Ctrl+shift+F10 or cmd+shift+F10 (Mac) will restart your R session. It unloads your packages but leaves the elements in your environment untouched. I use this a lot when I am jumping between scripts to minimise conflicts between packages.