SlideShare a Scribd company logo
Documents and Apps
Project System
Write Code R Support RStudio Pro Features
Debug Mode Version Control with Git or SVN
Package Writing
Project System
Write Code R Support RStudio Pro Features
Debug Mode Version Control with Git or SVN
Package Writing
Turn project into package,
Enable roxygen documentation with
Tools > Project Options > Build Tools
Roxygen guide at
Help > Roxygen Quick Reference
File > New Project >
New Directory > R Package
learn more at www.rstudio.com
The RStudio IDE is an Integrated Development Environment in R that comes in three versions
Desktop IDE
A local version of the IDE
for your desktop
Open Source Server
for larger compute resources
and remote access
Professional Server
for teams that share large compute
resources, large data, and uniform
environments for collaboration
Download all at www.rstudio.com. Each provides the same useful interface:
Share Project
with Collaborators
Active shared
collaborators
Select
R Version
Start new R Session
in current project
Close R Session
in projectJHT
RStudio saves the call history,
workspace, and working
directory associated with a
project. It reloads each when
you re-open a project.
Name of
current project
View(<data>) opens spreadsheet like view of data set
Sort by
values
Filter rows by value
or value range
Search
for value
Viewer Pane displays HTML content, such as Shiny apps,
RMarkdown reports, and interactive visualizations
Stop Shiny
app
Publish to shinyapps.io,
rpubs, RSConnect, …
Refresh
RStudio opens documentation in a dedicated Help pane
Home page of
helpful links
Search within
help file
Search for
help file
GUI Package manager lists every installed package
Click to load package with
library(). Unclick to detach
package with detach()
Delete
from
library
Install
Packages
Update
Packages
Create reproducible package
library for your project
RStudio opens plots in a dedicated Plots pane
Navigate
recent plots
Open in
window
Export
plot
Delete
plot
Delete
all plots
Package
version
installed
Examine variables
in executing
environment
Open with debug(), browse(), or a breakpoint. RStudio will open the
debugger mode when it encounters a breakpoint while executing code.
Open traceback to examine
the functions that R called
before the error occurred
Launch debugger
mode from origin
of error
Click next to
line number to
add/remove a
breakpoint.
Select function
in traceback to
debug
Highlighted
line shows
where
execution has
paused
Run commands in
environment where
execution has paused
Step through
code one line
at a time
Step into and
out of functions
to run
Resume
execution
Quit debug
mode
Open Shiny, R Markdown,
knitr, Sweave, LaTeX, .Rd files
and more in Source Pane
Check
spelling
Render
output
Choose
output
format
Choose
output
location
Insert
code
chunk
Jump to
previous
chunk
Jump
to next
chunk
Run
selected
lines
Publish
to server
Show file
outline
Set knitr
chunk
options
Run this and
all previous
code chunks
Run this
code chunk
Jump to
chunk
RStudio recognizes that files named app.R,
server.R, ui.R, and global.R belong to a shiny app
Run
app
Choose
location to
view app
Publish to
shinyapps.io
or server
Manage
publish
accounts
Access markdown guide at
Help > Markdown Quick Reference
RStudio IDE Cheat Sheet
RStudio® is a trademark of RStudio, Inc. • CC BY RStudio • info@rstudio.com • 844-448-1212 • rstudio.com Learn more at support.rstudio.com • RStudio IDE 0.99.832 • Updated: 01/16More cheat sheets at http://www.rstudio.com/resources/cheatsheets/
Stage
files:
Show file
diff
Commit
staged files
Push/Pull
to remote
View
History
current
branch
• Added
• Deleted
• Modified
• Renamed
• Untracked
Turn on at Tools > Project Options > Git/SVN
Open shell to
type commands
A
D
M
R
?
Search inside
environment
Syntax highlighting based
on your file's extension
Code diagnostics that appear in the margin.
Hover over diagnostic symbols for details.
Tab completion to finish
function names, file paths,
arguments, and more.
Multi-language code
snippets to quickly use
common blocks of code.
Open in new
window
Save Find and
replace
Compile as
notebook
Run
selected
code
Re-run
previous code
Source with or
without Echo
Show file
outline
Jump to function in file Change file type
Navigate
tabs
A File browser keyed to your working directory.
Click on file or directory name to open.
Path to displayed directory
Upload
file
Create
folder
Delete
file
Rename
file
Change
directory
Displays saved objects by
type with short description
View function
source code
View in data
viewer
Load
workspace
Save
workspace
Import data file
with wizard
Delete all
saved objects
Display objects
as list or grid
Choose environment to display from
list of parent environments
History of past
commands to
run/add to source
Display .RPres
slideshows
File > New File >
R Presentation
Working
Directory
Maximize,
minimize panes
Drag pane
boundaries
JHT
Cursors of
shared users
File > New Project
Press ! to see
command history
Multiple cursors/column selection
with Alt + mouse drag.
Documents and Apps
1 LAYOUT Windows/Linux Mac
Move focus to Source Editor Ctrl+1 Ctrl+1
Move focus to Console Ctrl+2 Ctrl+2
Move focus to Help Ctrl+3 Ctrl+3
Show History Ctrl+4 Ctrl+4
Show Files Ctrl+5 Ctrl+5
Show Plots Ctrl+6 Ctrl+6
Show Packages Ctrl+7 Ctrl+7
Show Environment Ctrl+8 Ctrl+8
Show Git/SVN Ctrl+9 Ctrl+9
Show Build Ctrl+0 Ctrl+0
4 WRITE CODE Windows /Linux Mac
Attempt completion Tab or Ctrl+Space Tab or Cmd+Space
Navigate candidates !/" !/"
Accept candidate Enter, Tab, or # Enter, Tab, or #
Dismiss candidates Esc Esc
Undo Ctrl+Z Cmd+Z
Redo Ctrl+Shift+Z Cmd+Shift+Z
Cut Ctrl+X Cmd+X
Copy Ctrl+C Cmd+C
Paste Ctrl+V Cmd+V
Select All Ctrl+A Cmd+A
Delete Line Ctrl+D Cmd+D
Select Shift+[Arrow] Shift+[Arrow]
Select Word Ctrl+Shift+ $/# Option+Shift+ $/#
Select to Line Start Alt+Shift+$ Cmd+Shift+$
Select to Line End Alt+Shift+# Cmd+Shift+#
Select Page Up/Down Shift+PageUp/Down Shift+PageUp/Down
Select to Start/End Shift+Alt+!/" Cmd+Shift+!/"
Delete Word Left Ctrl+Backspace Ctrl+Opt+Backspace
Delete Word Right   Option+Delete
Delete to Line End   Ctrl+K
Delete to Line Start   Option+Backspace
Indent Tab (at start of line) Tab (at start of line)
Outdent Shift+Tab Shift+Tab
Yank line up to cursor Ctrl+U Ctrl+U
Yank line after cursor Ctrl+K Ctrl+K
Insert yanked text Ctrl+Y Ctrl+Y
Insert <- Alt+- Option+-
Insert %>% Ctrl+Shift+M Cmd+Shift+M
Show help for function F1 F1
Show source code
unction
F2 F2
New document Ctrl+Shift+N Cmd+Shift+N
New document (Chrome) Ctrl+Alt+Shift+N Cmd+Shift+Alt+N
Open document Ctrl+O Cmd+O
Save document Ctrl+S Cmd+S
Close document Ctrl+W Cmd+W
Close document (Chrome) Ctrl+Alt+W Cmd+Option+W
Close all documents Ctrl+Shift+W Cmd+Shift+W
Extract function Ctrl+Alt+X Cmd+Option+X
Extract variable Ctrl+Alt+V Cmd+Option+V
Reindent lines Ctrl+I Cmd+I
(Un)Comment lines Ctrl+Shift+C Cmd+Shift+C
Reflow Comment Ctrl+Shift+/ Cmd+Shift+/
Reformat Selection Ctrl+Shift+A Cmd+Shift+A
Select within braces Ctrl+Shift+E Ctrl+Shift+E
Show Diagnostics Ctrl+Shift+Alt+P Cmd+Shift+Alt+P
Transpose Letters   Ctrl+T
Move Lines Up/Down Alt+!/" Option+!/"
Copy Lines Up/Down Shift+Alt+!/" Cmd+Option+!/"
Add New Cursor Above Ctrl+Alt+Up Ctrl+Alt+Up
Add New Cursor Below Ctrl+Alt+Down Ctrl+Alt+Down
Move Active Cursor Up Ctrl+Alt+Shift+Up Ctrl+Alt+Shift+Up
Move Active Cursor Down Ctrl+Alt+Shift+Down Ctrl+Alt+Shift+Down
Find and Replace Ctrl+F Cmd+F
Use Selection for Find Ctrl+F3 Cmd+E
Replace and Find Ctrl+Shift+J Cmd+Shift+J
2 RUN CODE Windows/Linux Mac
Search command history Ctrl+! Cmd+!
Navigate command history !/" !/"
Move cursor to start of line Home Cmd+$
Move cursor to end of line End Cmd+ #
Change working directory Ctrl+Shift+H Ctrl+Shift+H
Interrupt current command Esc Esc
Clear console Ctrl+L Ctrl+L
Quit Session (desktop only) Ctrl+Q Cmd+Q
Restart R Session Ctrl+Shift+F10 Cmd+Shift+F10
Run current line/selection Ctrl+Enter Cmd+Enter
Run current (retain cursor) Alt+Enter Option+Enter
Run from current to end Ctrl+Alt+E Cmd+Option+E
Run the current function
definition
Ctrl+Alt+F Cmd+Option+F
Source a file Ctrl+Shift+O Cmd+Shift+O
Source the current file Ctrl+Shift+S Cmd+Shift+S
Source with echo Ctrl+Shift+Enter Cmd+Shift+Enter
RStudio® is a trademark of RStudio, Inc. • CC BY RStudio • info@rstudio.com • 844-448-1212 • rstudio.com Learn more at support.rstudio.com • RStudio IDE 0.99.832 • Updated: 01/16More cheat sheets at http://www.rstudio.com/resources/cheatsheets/
3 NAVIGATE CODE Windows /Linux Mac
Goto File/Function Ctrl+. Ctrl+.
Fold Selected Alt+L Cmd+Option+L
Unfold Selected Shift+Alt+L Cmd+Shift+Option+L
Fold All Alt+O Cmd+Option+O
Unfold All Shift+Alt+O Cmd+Shift+Option+O
Go to line Shift+Alt+G Cmd+Shift+Option+G
Jump to Shift+Alt+J Cmd+Shift+Option+J
Switch to tab Ctrl+Shift+. Ctrl+Shift+.
Previous tab Ctrl+F11 Ctrl+F11
Next tab Ctrl+F12 Ctrl+F12
First tab Ctrl+Shift+F11 Ctrl+Shift+F11
Last tab Ctrl+Shift+F12 Ctrl+Shift+F12
Navigate back Ctrl+F9 Cmd+F9
Navigate forward Ctrl+F10 Cmd+F10
Jump to Brace Ctrl+P Ctrl+P
Select within Braces Ctrl+Shift+Alt+E Ctrl+Shift+Alt+E
Use Selection for Find Ctrl+F3 Cmd+E
Find in Files Ctrl+Shift+F Cmd+Shift+F
Find Next Win: F3, Linux: Ctrl+G Cmd+G
Find Previous W: Shift+F3, L: Ctrl+Shift
+G
Cmd+Shift+G
Jump to Word Ctrl+ $/# Option+ $/#
Jump to Start/End Ctrl+!/" Cmd+!/"
5 DEBUG CODE Windows/Linux Mac
Toggle Breakpoint Shift+F9 Shift+F9
Execute Next Line F10 F10
Step Into Function Shift+F4 Shift+F4
Finish Function/Loop Shift+F6 Shift+F6
Continue Shift+F5 Shift+F5
Stop Debugging Shift+F8 Shift+F8
6 VERSION CONTROL Windows/Linux Mac
Show diff Ctrl+Alt+D Ctrl+Option+D
Commit changes Ctrl+Alt+M Ctrl+Option+M
Scroll diff view Ctrl+!/" Ctrl+!/"
Stage/Unstage (Git) Spacebar Spacebar
Stage/Unstage and move to next Enter Enter
7 MAKE PACKAGES Windows/Linux Mac
Build and Reload Ctrl+Shift+B Cmd+Shift+B
Load All (devtools) Ctrl+Shift+L Cmd+Shift+L
Test Package (Desktop) Ctrl+Shift+T Cmd+Shift+T
Test Package (Web) Ctrl+Alt+F7 Cmd+Alt+F7
Check Package Ctrl+Shift+E Cmd+Shift+E
Document Package Ctrl+Shift+D Cmd+Shift+D
8 DOCUMENTS AND APPS Windows/Linux Mac
Preview HTML (Markdown, etc.) Ctrl+Shift+K Cmd+Shift+K
Knit Document (knitr) Ctrl+Shift+K Cmd+Shift+K
Compile Notebook Ctrl+Shift+K Cmd+Shift+K
Compile PDF (TeX and Sweave) Ctrl+Shift+K Cmd+Shift+K
Insert chunk (Sweave and Knitr) Ctrl+Alt+I Cmd+Option+I
Insert code section Ctrl+Shift+R Cmd+Shift+R
Re-run previous region Ctrl+Shift+P Cmd+Shift+P
Run current document Ctrl+Alt+R Cmd+Option+R
Run from start to current line Ctrl+Alt+B Cmd+Option+B
Run the current code section Ctrl+Alt+T Cmd+Option+T
Run previous Sweave/Rmd code Ctrl+Alt+P Cmd+Option+P
Run the current chunk Ctrl+Alt+C Cmd+Option+C
Run the next chunk Ctrl+Alt+N Cmd+Option+N
Sync Editor & PDF Preview Ctrl+F8 Cmd+F8
Previous plot Ctrl+Alt+F11 Cmd+Option+F11
Next plot Ctrl+Alt+F12 Cmd+Option+F12
Show Keyboard Shortcuts Alt+Shift+K Option+Shift+K
Why RStudio Server Pro?
Do everything you would do with the open source server with a
commercial license, support, and more.
• edit the same project at the same time as others
• switch easily from one version of R to a different version
• open and run multiple R sessions simultaneously
• see what you and others are doing on your server
• tune your resources to improve performance
• integrate with your authentication, authorization, and audit practices
Download a free 45 day evaluation at
www.rstudio.com/products/rstudio-server-pro/

More Related Content

PDF
Devtools cheatsheet
PDF
Rmarkdown cheatsheet-2.0
PPTX
Merge Multiple CSV in single data frame using R
PDF
JSON Data Parsing in Snowflake (By Faysal Shaarani)
PDF
Hive Functions Cheat Sheet
DOCX
Big Data Analytics Lab File
PDF
R data-import, data-export
 
PPS
Rpg Pointers And User Space
Devtools cheatsheet
Rmarkdown cheatsheet-2.0
Merge Multiple CSV in single data frame using R
JSON Data Parsing in Snowflake (By Faysal Shaarani)
Hive Functions Cheat Sheet
Big Data Analytics Lab File
R data-import, data-export
 
Rpg Pointers And User Space

What's hot (20)

PPTX
Java Data Migration with Data Pipeline
PPT
Session 19 - MapReduce
PPTX
Session 04 pig - slides
PDF
Introduction to Data Mining with R and Data Import/Export in R
PPT
File in cpp 2016
PDF
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
PPTX
Avro introduction
PDF
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
PDF
Writing MapReduce Programs using Java | Big Data Hadoop Spark Tutorial | Clou...
PPT
Cpp file-handling
PDF
Accessing Databases from R
PPT
Hadoop_Pennonsoft
PDF
Data Exploration with Apache Drill: Day 2
PDF
Foxpro (1)
PDF
Data Exploration with Apache Drill: Day 1
PDF
Import and Export Big Data using R Studio
PDF
Apache Hive Table Partition and HQL
PDF
Spark + Clojure for Topic Discovery - Zalando Tech Clojure/Conj Talk
PPT
working file handling in cpp overview
PPT
Best corporate-r-programming-training-in-mumbai
Java Data Migration with Data Pipeline
Session 19 - MapReduce
Session 04 pig - slides
Introduction to Data Mining with R and Data Import/Export in R
File in cpp 2016
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
Avro introduction
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Writing MapReduce Programs using Java | Big Data Hadoop Spark Tutorial | Clou...
Cpp file-handling
Accessing Databases from R
Hadoop_Pennonsoft
Data Exploration with Apache Drill: Day 2
Foxpro (1)
Data Exploration with Apache Drill: Day 1
Import and Export Big Data using R Studio
Apache Hive Table Partition and HQL
Spark + Clojure for Topic Discovery - Zalando Tech Clojure/Conj Talk
working file handling in cpp overview
Best corporate-r-programming-training-in-mumbai
Ad

Similar to Rstudio ide-cheatsheet (20)

PDF
rstudio-ide
PDF
rstudio-ide.pdf
PDF
Netbeans keyboard shortcut
PDF
Using eclipse-shortcuts-key-for-fast-coding
PDF
Productivity Hero. Know Your Tools
PDF
Sql dbx
PDF
Visual Studio 2010 - Microsoft Visual C# Key Bindings
PDF
Tips and Tricks for Using Visual Studio.Net Effectively
PDF
Php storm reference_card
PPTX
Zend Studio Tips and Tricks
PDF
IntelliJIDEA_ReferenceCard.pdf
PPTX
Coding Like the Wind - Tips and Tricks for the Microsoft Visual Studio 2012 C...
PDF
Ruby mine referencecard
PPT
Php Storm 8 The Most Intelligent php ide
TXT
Short cutkey
RTF
Eclipse emacskeybindings 3_1
PPTX
578781850-RHSA-1-Chapte578781850-RHSA-1-Chapter-4r-4.pptx
PDF
C++ Windows Forms L03 - Controls P2
PPTX
7 free Visual Studio extensions
PDF
The Ring programming language version 1.9 book - Part 7 of 210
rstudio-ide
rstudio-ide.pdf
Netbeans keyboard shortcut
Using eclipse-shortcuts-key-for-fast-coding
Productivity Hero. Know Your Tools
Sql dbx
Visual Studio 2010 - Microsoft Visual C# Key Bindings
Tips and Tricks for Using Visual Studio.Net Effectively
Php storm reference_card
Zend Studio Tips and Tricks
IntelliJIDEA_ReferenceCard.pdf
Coding Like the Wind - Tips and Tricks for the Microsoft Visual Studio 2012 C...
Ruby mine referencecard
Php Storm 8 The Most Intelligent php ide
Short cutkey
Eclipse emacskeybindings 3_1
578781850-RHSA-1-Chapte578781850-RHSA-1-Chapter-4r-4.pptx
C++ Windows Forms L03 - Controls P2
7 free Visual Studio extensions
The Ring programming language version 1.9 book - Part 7 of 210
Ad

More from Dieudonne Nahigombeye (10)

PDF
Reg ex cheatsheet
PDF
How big-is-your-graph
PDF
Ggplot2 cheatsheet-2.1
PDF
Eurostat cheatsheet
PDF
Devtools cheatsheet
PDF
Data transformation-cheatsheet
PDF
Data import-cheatsheet
PDF
Reg ex cheatsheet
How big-is-your-graph
Ggplot2 cheatsheet-2.1
Eurostat cheatsheet
Devtools cheatsheet
Data transformation-cheatsheet
Data import-cheatsheet

Recently uploaded (20)

PPTX
IB Computer Science - Internal Assessment.pptx
PDF
Introduction to Data Science and Data Analysis
PPTX
Computer network topology notes for revision
PDF
Business Analytics and business intelligence.pdf
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
Supervised vs unsupervised machine learning algorithms
PPTX
STERILIZATION AND DISINFECTION-1.ppthhhbx
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PPTX
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
PDF
annual-report-2024-2025 original latest.
PPTX
Leprosy and NLEP programme community medicine
PPTX
Managing Community Partner Relationships
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPT
Predictive modeling basics in data cleaning process
PDF
Introduction to the R Programming Language
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
PPTX
SAP 2 completion done . PRESENTATION.pptx
PPT
Reliability_Chapter_ presentation 1221.5784
IB Computer Science - Internal Assessment.pptx
Introduction to Data Science and Data Analysis
Computer network topology notes for revision
Business Analytics and business intelligence.pdf
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Supervised vs unsupervised machine learning algorithms
STERILIZATION AND DISINFECTION-1.ppthhhbx
Data_Analytics_and_PowerBI_Presentation.pptx
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
annual-report-2024-2025 original latest.
Leprosy and NLEP programme community medicine
Managing Community Partner Relationships
IBA_Chapter_11_Slides_Final_Accessible.pptx
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
Predictive modeling basics in data cleaning process
Introduction to the R Programming Language
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
SAP 2 completion done . PRESENTATION.pptx
Reliability_Chapter_ presentation 1221.5784

Rstudio ide-cheatsheet

  • 1. Documents and Apps Project System Write Code R Support RStudio Pro Features Debug Mode Version Control with Git or SVN Package Writing Project System Write Code R Support RStudio Pro Features Debug Mode Version Control with Git or SVN Package Writing Turn project into package, Enable roxygen documentation with Tools > Project Options > Build Tools Roxygen guide at Help > Roxygen Quick Reference File > New Project > New Directory > R Package learn more at www.rstudio.com The RStudio IDE is an Integrated Development Environment in R that comes in three versions Desktop IDE A local version of the IDE for your desktop Open Source Server for larger compute resources and remote access Professional Server for teams that share large compute resources, large data, and uniform environments for collaboration Download all at www.rstudio.com. Each provides the same useful interface: Share Project with Collaborators Active shared collaborators Select R Version Start new R Session in current project Close R Session in projectJHT RStudio saves the call history, workspace, and working directory associated with a project. It reloads each when you re-open a project. Name of current project View(<data>) opens spreadsheet like view of data set Sort by values Filter rows by value or value range Search for value Viewer Pane displays HTML content, such as Shiny apps, RMarkdown reports, and interactive visualizations Stop Shiny app Publish to shinyapps.io, rpubs, RSConnect, … Refresh RStudio opens documentation in a dedicated Help pane Home page of helpful links Search within help file Search for help file GUI Package manager lists every installed package Click to load package with library(). Unclick to detach package with detach() Delete from library Install Packages Update Packages Create reproducible package library for your project RStudio opens plots in a dedicated Plots pane Navigate recent plots Open in window Export plot Delete plot Delete all plots Package version installed Examine variables in executing environment Open with debug(), browse(), or a breakpoint. RStudio will open the debugger mode when it encounters a breakpoint while executing code. Open traceback to examine the functions that R called before the error occurred Launch debugger mode from origin of error Click next to line number to add/remove a breakpoint. Select function in traceback to debug Highlighted line shows where execution has paused Run commands in environment where execution has paused Step through code one line at a time Step into and out of functions to run Resume execution Quit debug mode Open Shiny, R Markdown, knitr, Sweave, LaTeX, .Rd files and more in Source Pane Check spelling Render output Choose output format Choose output location Insert code chunk Jump to previous chunk Jump to next chunk Run selected lines Publish to server Show file outline Set knitr chunk options Run this and all previous code chunks Run this code chunk Jump to chunk RStudio recognizes that files named app.R, server.R, ui.R, and global.R belong to a shiny app Run app Choose location to view app Publish to shinyapps.io or server Manage publish accounts Access markdown guide at Help > Markdown Quick Reference RStudio IDE Cheat Sheet RStudio® is a trademark of RStudio, Inc. • CC BY RStudio • info@rstudio.com • 844-448-1212 • rstudio.com Learn more at support.rstudio.com • RStudio IDE 0.99.832 • Updated: 01/16More cheat sheets at http://www.rstudio.com/resources/cheatsheets/ Stage files: Show file diff Commit staged files Push/Pull to remote View History current branch • Added • Deleted • Modified • Renamed • Untracked Turn on at Tools > Project Options > Git/SVN Open shell to type commands A D M R ? Search inside environment Syntax highlighting based on your file's extension Code diagnostics that appear in the margin. Hover over diagnostic symbols for details. Tab completion to finish function names, file paths, arguments, and more. Multi-language code snippets to quickly use common blocks of code. Open in new window Save Find and replace Compile as notebook Run selected code Re-run previous code Source with or without Echo Show file outline Jump to function in file Change file type Navigate tabs A File browser keyed to your working directory. Click on file or directory name to open. Path to displayed directory Upload file Create folder Delete file Rename file Change directory Displays saved objects by type with short description View function source code View in data viewer Load workspace Save workspace Import data file with wizard Delete all saved objects Display objects as list or grid Choose environment to display from list of parent environments History of past commands to run/add to source Display .RPres slideshows File > New File > R Presentation Working Directory Maximize, minimize panes Drag pane boundaries JHT Cursors of shared users File > New Project Press ! to see command history Multiple cursors/column selection with Alt + mouse drag. Documents and Apps
  • 2. 1 LAYOUT Windows/Linux Mac Move focus to Source Editor Ctrl+1 Ctrl+1 Move focus to Console Ctrl+2 Ctrl+2 Move focus to Help Ctrl+3 Ctrl+3 Show History Ctrl+4 Ctrl+4 Show Files Ctrl+5 Ctrl+5 Show Plots Ctrl+6 Ctrl+6 Show Packages Ctrl+7 Ctrl+7 Show Environment Ctrl+8 Ctrl+8 Show Git/SVN Ctrl+9 Ctrl+9 Show Build Ctrl+0 Ctrl+0 4 WRITE CODE Windows /Linux Mac Attempt completion Tab or Ctrl+Space Tab or Cmd+Space Navigate candidates !/" !/" Accept candidate Enter, Tab, or # Enter, Tab, or # Dismiss candidates Esc Esc Undo Ctrl+Z Cmd+Z Redo Ctrl+Shift+Z Cmd+Shift+Z Cut Ctrl+X Cmd+X Copy Ctrl+C Cmd+C Paste Ctrl+V Cmd+V Select All Ctrl+A Cmd+A Delete Line Ctrl+D Cmd+D Select Shift+[Arrow] Shift+[Arrow] Select Word Ctrl+Shift+ $/# Option+Shift+ $/# Select to Line Start Alt+Shift+$ Cmd+Shift+$ Select to Line End Alt+Shift+# Cmd+Shift+# Select Page Up/Down Shift+PageUp/Down Shift+PageUp/Down Select to Start/End Shift+Alt+!/" Cmd+Shift+!/" Delete Word Left Ctrl+Backspace Ctrl+Opt+Backspace Delete Word Right   Option+Delete Delete to Line End   Ctrl+K Delete to Line Start   Option+Backspace Indent Tab (at start of line) Tab (at start of line) Outdent Shift+Tab Shift+Tab Yank line up to cursor Ctrl+U Ctrl+U Yank line after cursor Ctrl+K Ctrl+K Insert yanked text Ctrl+Y Ctrl+Y Insert <- Alt+- Option+- Insert %>% Ctrl+Shift+M Cmd+Shift+M Show help for function F1 F1 Show source code unction F2 F2 New document Ctrl+Shift+N Cmd+Shift+N New document (Chrome) Ctrl+Alt+Shift+N Cmd+Shift+Alt+N Open document Ctrl+O Cmd+O Save document Ctrl+S Cmd+S Close document Ctrl+W Cmd+W Close document (Chrome) Ctrl+Alt+W Cmd+Option+W Close all documents Ctrl+Shift+W Cmd+Shift+W Extract function Ctrl+Alt+X Cmd+Option+X Extract variable Ctrl+Alt+V Cmd+Option+V Reindent lines Ctrl+I Cmd+I (Un)Comment lines Ctrl+Shift+C Cmd+Shift+C Reflow Comment Ctrl+Shift+/ Cmd+Shift+/ Reformat Selection Ctrl+Shift+A Cmd+Shift+A Select within braces Ctrl+Shift+E Ctrl+Shift+E Show Diagnostics Ctrl+Shift+Alt+P Cmd+Shift+Alt+P Transpose Letters   Ctrl+T Move Lines Up/Down Alt+!/" Option+!/" Copy Lines Up/Down Shift+Alt+!/" Cmd+Option+!/" Add New Cursor Above Ctrl+Alt+Up Ctrl+Alt+Up Add New Cursor Below Ctrl+Alt+Down Ctrl+Alt+Down Move Active Cursor Up Ctrl+Alt+Shift+Up Ctrl+Alt+Shift+Up Move Active Cursor Down Ctrl+Alt+Shift+Down Ctrl+Alt+Shift+Down Find and Replace Ctrl+F Cmd+F Use Selection for Find Ctrl+F3 Cmd+E Replace and Find Ctrl+Shift+J Cmd+Shift+J 2 RUN CODE Windows/Linux Mac Search command history Ctrl+! Cmd+! Navigate command history !/" !/" Move cursor to start of line Home Cmd+$ Move cursor to end of line End Cmd+ # Change working directory Ctrl+Shift+H Ctrl+Shift+H Interrupt current command Esc Esc Clear console Ctrl+L Ctrl+L Quit Session (desktop only) Ctrl+Q Cmd+Q Restart R Session Ctrl+Shift+F10 Cmd+Shift+F10 Run current line/selection Ctrl+Enter Cmd+Enter Run current (retain cursor) Alt+Enter Option+Enter Run from current to end Ctrl+Alt+E Cmd+Option+E Run the current function definition Ctrl+Alt+F Cmd+Option+F Source a file Ctrl+Shift+O Cmd+Shift+O Source the current file Ctrl+Shift+S Cmd+Shift+S Source with echo Ctrl+Shift+Enter Cmd+Shift+Enter RStudio® is a trademark of RStudio, Inc. • CC BY RStudio • info@rstudio.com • 844-448-1212 • rstudio.com Learn more at support.rstudio.com • RStudio IDE 0.99.832 • Updated: 01/16More cheat sheets at http://www.rstudio.com/resources/cheatsheets/ 3 NAVIGATE CODE Windows /Linux Mac Goto File/Function Ctrl+. Ctrl+. Fold Selected Alt+L Cmd+Option+L Unfold Selected Shift+Alt+L Cmd+Shift+Option+L Fold All Alt+O Cmd+Option+O Unfold All Shift+Alt+O Cmd+Shift+Option+O Go to line Shift+Alt+G Cmd+Shift+Option+G Jump to Shift+Alt+J Cmd+Shift+Option+J Switch to tab Ctrl+Shift+. Ctrl+Shift+. Previous tab Ctrl+F11 Ctrl+F11 Next tab Ctrl+F12 Ctrl+F12 First tab Ctrl+Shift+F11 Ctrl+Shift+F11 Last tab Ctrl+Shift+F12 Ctrl+Shift+F12 Navigate back Ctrl+F9 Cmd+F9 Navigate forward Ctrl+F10 Cmd+F10 Jump to Brace Ctrl+P Ctrl+P Select within Braces Ctrl+Shift+Alt+E Ctrl+Shift+Alt+E Use Selection for Find Ctrl+F3 Cmd+E Find in Files Ctrl+Shift+F Cmd+Shift+F Find Next Win: F3, Linux: Ctrl+G Cmd+G Find Previous W: Shift+F3, L: Ctrl+Shift +G Cmd+Shift+G Jump to Word Ctrl+ $/# Option+ $/# Jump to Start/End Ctrl+!/" Cmd+!/" 5 DEBUG CODE Windows/Linux Mac Toggle Breakpoint Shift+F9 Shift+F9 Execute Next Line F10 F10 Step Into Function Shift+F4 Shift+F4 Finish Function/Loop Shift+F6 Shift+F6 Continue Shift+F5 Shift+F5 Stop Debugging Shift+F8 Shift+F8 6 VERSION CONTROL Windows/Linux Mac Show diff Ctrl+Alt+D Ctrl+Option+D Commit changes Ctrl+Alt+M Ctrl+Option+M Scroll diff view Ctrl+!/" Ctrl+!/" Stage/Unstage (Git) Spacebar Spacebar Stage/Unstage and move to next Enter Enter 7 MAKE PACKAGES Windows/Linux Mac Build and Reload Ctrl+Shift+B Cmd+Shift+B Load All (devtools) Ctrl+Shift+L Cmd+Shift+L Test Package (Desktop) Ctrl+Shift+T Cmd+Shift+T Test Package (Web) Ctrl+Alt+F7 Cmd+Alt+F7 Check Package Ctrl+Shift+E Cmd+Shift+E Document Package Ctrl+Shift+D Cmd+Shift+D 8 DOCUMENTS AND APPS Windows/Linux Mac Preview HTML (Markdown, etc.) Ctrl+Shift+K Cmd+Shift+K Knit Document (knitr) Ctrl+Shift+K Cmd+Shift+K Compile Notebook Ctrl+Shift+K Cmd+Shift+K Compile PDF (TeX and Sweave) Ctrl+Shift+K Cmd+Shift+K Insert chunk (Sweave and Knitr) Ctrl+Alt+I Cmd+Option+I Insert code section Ctrl+Shift+R Cmd+Shift+R Re-run previous region Ctrl+Shift+P Cmd+Shift+P Run current document Ctrl+Alt+R Cmd+Option+R Run from start to current line Ctrl+Alt+B Cmd+Option+B Run the current code section Ctrl+Alt+T Cmd+Option+T Run previous Sweave/Rmd code Ctrl+Alt+P Cmd+Option+P Run the current chunk Ctrl+Alt+C Cmd+Option+C Run the next chunk Ctrl+Alt+N Cmd+Option+N Sync Editor & PDF Preview Ctrl+F8 Cmd+F8 Previous plot Ctrl+Alt+F11 Cmd+Option+F11 Next plot Ctrl+Alt+F12 Cmd+Option+F12 Show Keyboard Shortcuts Alt+Shift+K Option+Shift+K Why RStudio Server Pro? Do everything you would do with the open source server with a commercial license, support, and more. • edit the same project at the same time as others • switch easily from one version of R to a different version • open and run multiple R sessions simultaneously • see what you and others are doing on your server • tune your resources to improve performance • integrate with your authentication, authorization, and audit practices Download a free 45 day evaluation at www.rstudio.com/products/rstudio-server-pro/