2025-01-24
Here are some of my favorite things!
Tools > Keyboard Shortcuts Help or Alt/Opt+Shift+K
Function | Keyboard shortcut |
---|---|
Run current line | Ctrl/Cmd+Enter/Return |
Source entire script | Ctrl/Cmd+Shift+S |
Insert assignment operator | Alt/Opt+- |
Insert pipe | Ctrl/Cmd+Shift+M |
Comment lines | Ctrl/Cmd+Shift+C |
Learn to use keyboard shortcuts (not just RStudio shortcuts, but general ones)
You can remap RStudio keyboard shortcuts (I’ve remapped Insert assignment operator to Ctrl/Cmd+Shift+,)
Your cursor can be anywhere in your code to useCtrl/Cmd+Enter to run it
Use autocomplete
Copy/paste to avoid misspelling
Restart R often