RStudio IDE : : CHEAT SHEET - GitHub

RStudio IDE : : CHEATSHEET

Documents and Apps Source Editor

Tab Panes

Version

Open Shiny, R Markdown, knitr, Sweave, LaTeX, .Rd files and more in Source Pane

Navigate backwards/ forwards

Check Render Choose Configure Insert spelling output output render code Publish

format options chunk to server

Jump to Jump previous to next chunk chunk

Jump to section or chunk

Run Show file Visual code outline Editor

(reverse side) Run this and all previous Run this code chunks code chunk

Set knitr chunk options

Open in new Save Find and Compile as Run

window

replace notebook selected

code

Re-run previous code

Source with or Show file w/out Echo or outline

as a Local Job

Multiple cursors/column selection with Alt + mouse drag.

Code diagnostics that appear in the margin. Hover over diagnostic symbols for details.

Syntax highlighting based on your file's extension

Tab completion to finish function names, file paths, arguments, and more.

Import data with wizard

History of past commands to run/copy

Control Manage View R tutorials

external memory

databases usage

Turn on at Tools > Project Options > Git/SVN

A? Added D? Deleted

M? Modified R? Renamed

?? Untracked

Load

Save

Clear R

workspace workspace workspace

Choose environment to display from list of parent environments

Search inside environment

Display objects as list or grid

Stage Commit Push/Pull View Current files: staged files to remote History branch

Open shell to type commands Show file di to view file di erences

Displays saved objects by type with short description

View in data View function

viewer

source code

Access markdown guide at Help > Markdown Quick Reference See reverse side for more on Visual Editor

RStudio recognizes that files named app.R, server.R, ui.R, and global.R belong to a shiny app

Run Choose Publish to Manage app location to shinyapps.io publish

view app or server accounts

Multi-language code snippets to quickly use common blocks of code.

Jump to function in file

Change file type

Create Delete Rename folder file file

Path to displayed directory

More file options

Working

Run scripts in Maximize,

Directory

separate sessions minimize panes A File browser keyed to your working directory.

Ctrl/Cmd + R Markdown Drag pane

Click on file or directory name to open.

to see history Build Log

boundaries

Change directory

Debug Mode

Use debug(), browser(), or a breakpoint and execute your code to open the debugger mode.

Launch debugger mode from origin of error

Open traceback to examine the functions that R called before the error occurred

Package Development

Create a new package with File > New Project > New Directory > R Package

Enable roxygen documentation with Tools > Project Options > Build Tools

Roxygen guide at Help > Roxygen Quick Reference See package information in the Build Tab

Install package and restart R

Run devtools::load_all() and reload changes

Run R CMD check

Customize package build options

Clear output and rebuild

Run package tests

RStudio opens plots in a dedicated Plots pane

RStudio opens documentation in a dedicated Help pane

Click next to line number to Highlighted line shows where add/remove a breakpoint. execution has paused

Navigate Open in Export Delete Delete

recent plots window plot

plot all plots

Home page of helpful links

Search within help file

Search for help file

GUI Package manager lists every installed package

Viewer pane displays HTML content, such as Shiny apps, RMarkdown reports, and interactive visualizations

Install Update Packages Packages

Browse package site

Click to load package with library(). Unclick to detach package with detach().

Package version installed

Delete from library

Stop Shiny app

Publish to shinyapps.io, Refresh Posit Connect, Posit Cloud,...

View() opens spreadsheet like view of data set

Run commands in

Examine variables Select function

environment where in executing

in traceback to

execution has paused environment

debug

Filter rows by value or value range

Sort by values

Search for value

Step through Step into and Resume Quit debug

code one line out of functions execution mode

at a time

to run

CC BY SA Posit So ware, PBC ? info@posit.co ? posit.co ? Learn more at products/open-source/rstudio ? HTML cheatsheets at pos.it/cheatsheets ? RStudio IDE 2024.04.1+748 ? Updated: 2024-05

f f

tf ff a

Keyboard Shortcuts

RUN CODE Search command history Interrupt current command Clear console

Windows/Linux Ctrl+ Esc Ctrl+L

Mac Cmd+ Esc Ctrl+L

NAVIGATE CODE Go to File/Function

Ctrl+.

Ctrl+.

WRITE CODE Attempt completion

Tab or Ctrl+Space Tab or Ctrl+Space

Insert or %>% (pipe operator) (Un)Comment selection

MAKE PACKAGES Load All (devtools) Test Package (Desktop) Document Package

Alt+Ctrl+Shi +M Ctrl+Shi +C

Option+Cmd+Shi +M Cmd+Shi +C

Windows/Linux Ctrl+Shi +L Ctrl+Shi +T Ctrl+Shi +D

Mac Cmd+Shi +L Cmd+Shi +T Cmd+Shi +D

DOCUMENTS AND APPS Knit/Render Document (knitr) Insert chunk (Sweave & Knitr) Run from start to current line

Windows/Linux Mac

Ctrl+Shi +K Cmd+Shi +K

Ctrl+Alt+I

Cmd+Option+I

Ctrl+Alt+B

Cmd+Option+B

MORE KEYBOARD SHORTCUTS

Keyboard Shortcuts Help

Alt+Shi +K

Show Command Palette

Ctrl+Shi +P

Option+Shi +K Cmd+Shi +P

View the Keyboard Shortcut Quick Reference with Tools > Keyboard Shortcuts or Alt/Option + Shi + K

Search for keyboard shortcuts with Tools > Show Command Palette or Ctrl/Cmd + Shi + P.

Visual Editor

Check Render spelling output

Choose output format

Choose output location

Block format

Insert code chunk

Jump to Jump previous to next chunk chunk

Run selected lines

Publish to server

Show file outline

Back to Source Editor (front page)

Lists and block quotes

Clear formatting

Insert verbatim code

Links

Citations

Images

More formatting

Insert blocks, citations, equations, and special characters

Insert and edit tables

File outline

Add/Edit attributes

Posit Workbench

WHY POSIT WORKBENCH?

Extend the open source server with a commercial license, support, and more:

? open and run multiple R sessions at once ? tune your resources to improve performance ? administrative tools for managing user sessions ? collaborate real-time with others in shared projects ? switch easily from one version of R to a di erent version ? integrate with your authentication, authorization, and audit practices ? work in the RStudio IDE, JupyterLab, Jupyter Notebooks, or VS Code

Download a free 45 day evaluation at products/enterprise/workbench/

Share Projects

File > New Project

RStudio saves the call history, workspace, and working directory associated with a project. It reloads each when you re-open a project.

Start new R Session Close R Session

in current project

in project

T HJ

Active shared collaborators

Name of current project

Share Project with Collaborators

Select R Version

Run Remote Jobs

Run R on remote clusters (Kubernetes/Slurm) via the Job Launcher

Monitor launcher jobs

Launch a job

Jump to chunk or header

Set knitr chunk options

Run this and all previous code chunks

Run this code chunk

Run launcher jobs remotely

CC BY SA Posit So ware, PBC ? info@posit.co ? posit.co ? Learn more at products/open-source/rstudio ? HTML cheatsheets at pos.it/cheatsheets ? RStudio IDE 2024.04.1+748 ? Updated: 2024-05

f

f

tf tf tf t

f t tf f t t t t t t t f f f f f f f t t t t t t f f f f f f

a a

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download