Cheat Sheet Rstudio



RStudio IDE Cheatsheet. The RStudio IDE is the most popular integrated development environment for R. Do you want to write, run, and debug your own R code? Work collaboratively on R projects with version control? Build packages or create documents and apps? No matter what you do with R, the RStudio IDE can help you do it faster. RStudio IDE:: CHEAT SHEET Write Code Pro Features RStudio® is a trademark of RStudio, Inc. CC BY SA RStudio. info@rstudio.com. 844-448-1212. rstudio.com. Learn more at www.rstudio.com. RStudio IDE 0.99.832. Updated: 2016-01 Turn project into package, Enable roxygen documentation with. Cheat Sheet RStudio® is a trademark of RStudio, Inc. CC BY RStudio. info@rstudio.com. 844-448-1212. rstudio.com Learn more at docs.ggplot2.org. ggplot2 0.9.3.1. Updated: 3/15 Geoms - Use a geom to represent data points, use the geom’s aesthetic properties to represent variables. Each function returns a layer.

2015-06-22Garrett Grolemund
We’ve added two new tools that make it even easier to learn Shiny.Video tutorial The How to Start with Shiny training video provides a new way to teach yourself Shiny. The video covers everything you need to know to build your own Shiny apps. You’ll learn: The architecture of a Shiny app A template for making apps quickly The basics of building Shiny apps How to add sliders, drop down menus, buttons, and more to your apps Read more →
We’ve added a new cheatsheet to our collection. Data Visualization with ggplot2 describes how to build a plot with ggplot2 and the grammar of graphics. You will find helpful reminders of how to use: geoms stats scales coordinate systems facets position adjustments legends, and themes The cheatsheet also documents tips on zooming.Download the cheatsheet here.Bonus - Frans van Dunné of Innovate Online has provided Spanish translations of the Data Wrangling, R Markdown, Shiny, and Package Development cheatsheets. Read more →

Search

News & Events

Upcoming webinars ↪

Data.table Cheat Sheet Rstudio

Categories

  • Company News & Events (7)
  • Data Science Leadership (41)
  • Data visualization (1)
  • Education (6)
  • Events (9)
  • Featured (41)
  • Internships (3)
  • News (116)
  • Packages (175)
  • R Markdown (26)
  • RStudio (1)
  • RStudio Cloud (3)
  • RStudio Connect (38)
  • RStudio IDE (82)
  • RStudio Launcher Plugin SDK (1)
  • RStudio Package Manager (12)
  • RStudio Server Pro (1)
  • Shiny (75)
  • Training (49)
  • packages (1)
  • r-markdown (1)
  • rstudio::conf (23)
  • rstudio::global (2)
  • shinyapps.io (10)
  • tidyverse (35)

About RStudio

Documentation#

TopicLink
Generalhttps://docs.rstudio.com/
Installing Rhttps://docs.rstudio.com/resources/install-r/
Installing Pythonhttps://docs.rstudio.com/resources/install-python/
RStudio Server admin guidehttps://docs.rstudio.com/ide/server-pro/
RStudio Connect admin guidehttps://docs.rstudio.com/connect/admin/
RStudio Package Manager admin guidehttps://docs.rstudio.com/rspm/admin/
Pro Drivershttps://docs.rstudio.com/pro-drivers/

Pre-requisites:

Installing R#

Install R from pre-compiled binaries#

R Cheat Sheets

Recommended best practise is to install R from pre-compiled binaries

For example, on Ubuntu 18.04 for R version 3.6.1.

This script installs into /opt/R/...

Verify installation:

RStudio Server Pro#

Admin guide: https://docs.rstudio.com/ide/server-pro/

Starting, stopping and restarting#

Running the verify installation command:

To restart the RSP service and check its status, run these commands (with sudo if necessary):

Status#

Error logs#

The locations of the various server log files:

The server log is at:

RStudio Connect#

Admin guide: https://docs.rstudio.com/connect/admin/

Config file#

Systemd vs upstart#

Distributions using systemd include Red Hat/CentOS 7, Red Hat/CentOS 8, SUSE 12, Ubuntu 16.04, and Ubuntu 18.04.

  • systemctl start rstudio-connect

Distributions using Upstart include Red Hat/CentOS 6 and Ubuntu 14.04.

  • start rstudio-connect

Starting and stopping#

Checking status#

Log files#

Get the diagnostics script#

RStudio Package Manager#

Admin guide: https://docs.rstudio.com/rspm/admin/

The rspm command#

Try running the rspm command on the server instance where RSPM is installed:

To save keystrokes when typing RSPM commands, create a command alias for therspm command:

Run the rspm command with no arguments for a list of available commands:

Working with CRAN#

Manage repositories and sources#

Manage packages#

Working with repositories#

Utilities#

System health check#

You have various methods to check the health of your RSPM instance:

  1. View the RSPM application logs:

  2. View the RSPM access logs:

  3. Check the status of your RSPM license:

  4. Run RSPM diagnostics:

  5. View diagnostics output:

License manager#

View license status#

Activate license:

List of available commands:

Supported commands:

Expired license#

Things to try:

  • Check time and time zone timedatectl
  • Resync if needed, e.g. sudo hwclock -w
  • Restart

Deactivating a license#

Deactivation tool: http://apps.rstudio.com/deactivate-license/

Pro Drivers#

Documentation overview: https://docs.rstudio.com/pro-drivers/

Driver locations:

Troubleshooting#

Troubleshooting R#

Almost all RStudio products depend on R being installed successfully to run.

  • Look for errors related to R in the server logs

Can R be launched manually and can the user's code be run in R without any errors?

How was R installed?

  • From source or pre-compiled binaries? If so, were all correct flags and capabilities set?
Regex

Are all necessary dependencies installed?

Are the permissions set correctly to allow r-x by all?

Are there multiple versions of R on the system?

Troubleshooting configuration#

Look for any errors in the startup. You can view the live log during startup using:

Read through the admin guides and make sure you have the correct formatting

Make sure you're on the right version of the product compared to the admin guide!

Cheat Sheet Rstudio

Troubleshooting authentication#

It is difficult for RStudio Support to troubleshoot as it depends on external configuration values unknown to us.

Does it work outside of the RStudio product?

  • Often possible to copy over working setup from other systems or services.
  • For RStudio Server Pro, thepamtester utility lets you test outside RStudio systems.

Check server log files including access.log files.

Check connections to any external authentication providers

  • Kerberos, Active Directory, etc.

General Linux tips#

Cheat Sheets R Studio

Operating system version#

What OS are you using?

Dplyr Cheat Sheet Rstudio

or

Export environment variable to PATH#

Persist changes on startup in .bashrc#

Dplyr Cheat Sheet R Studio

You can run scripts and define variables on startup by adding lines to your .bashrc file: