Some useful RStudio shortcuts...

ShortcutWhat it does
Alt + - Insert the assignment operator <- 
Ctrl + Shift + MInsert pipe %>% 
Ctrl + Shift + R Insert section
Ctrl + Alt + I Insert or breaks up RMarkdown code chunk
Ctrl + Alt + B Run all code from beginning of script to cursor
Ctrl + Alt + E Run all code from cursor to end of script
Alt + Up/Down Move selected code up or down
Ctrl + Alt +  click Creates multiple cursors
Ctrl + I Fix line indentations
Ctrl + Shift + A Reformat selected code
Ctrl + Shift + C Comment or uncomment selected code


More resources

https://www.appsilon.com/post/rstudio-shortcuts-and-tips

https://www.dataquest.io/blog/rstudio-tips-tricks-shortcuts/

https://www.reddit.com/r/rstats/comments/jvdc4z/favorite_shortcutstips_for_r/

  • No labels