Author

Emma Vestesson

Published

May 21, 2018

Modified

February 21, 2024

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 and I have pulled together my three most used shortcuts.

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.

Ctrl+shift+m or cmd+shift+m (Mac) will insert a pipe (if you don’t already use pipes then you can learn more in R for Data Science.

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.

Back to top

Reuse

CC0

Citation

For attribution, please cite this work as:
Vestesson, Emma. 2018. “R Studio Shortcuts.” May 21, 2018. https://nhs-r-community.github.io/nhs-r-community/blog/r-studio-shortcuts.html.