Cheatsheets 2018-01-17T10:58:13+00:00

RStudio Cheat Sheets

The cheat sheets below make it easy to learn about and use some of our favorite packages. From time to time, we will add new cheat sheets to the gallery. If you’d like us to drop you an email when we do, let us know by clicking the button to the right.

Subscribe to cheat sheet updates here

Deep Learning with Keras Cheat Sheet

Keras is a high-level neural networks API developed with a focus on enabling fast experimentation. Keras supports both convolution based networks and recurrent networks (as well as combinations of the two),  runs seamlessly on both CPU and GPU devices,  and is capable of running on top of multiple back-ends including TensorFlowCNTK, and Theano. Updated 12/17.


Dates and Times Cheat Sheet

Lubridate makes it easier to work with dates and times in R. This lubridate cheatsheet covers how to round dates, work with time zones, extract elements of a date or time, parse dates into R and more. The back of the cheatsheet describes lubridate’s three timespan classes: periods, durations, and intervals; and explains how to do math with date-times. Updated 12/17.


Work with Strings Cheat Sheet

The stringr package provides an easy to use toolkit for working with strings, i.e. character data, in R. This cheatsheet guides you through stringr’s functions for manipulating strings. The back page provides a concise reference to regular expresssions, a mini-language for describing, finding, and matching patterns in strings. Updated 10/17.


Apply Functions Cheat Sheet

The purrr package makes it easy to work with lists and functions. This cheatsheet will remind you how to manipulate lists with purrr as well as how to apply functions iteratively to each element of a list or vector. The back of the cheatsheet explains how to work with list-columns. With list columns, you can use a simple data frame to organize any collection of objects in R. Updated 09/17.


Data Import Cheat Sheet

The Data Import cheat sheet reminds you how to read in flat files with, work with the results as tibbles, and reshape messy data with tidyr. Use tidyr to reshape your tables into tidy data, the data format that works the most seamlessly with R and the tidyverse. Updated 01/17.


Data Transformation Cheat Sheet

dplyr provides a grammar for manipulating tables in R. This cheat sheet will guide you through the grammar, reminding you how to select, filter, arrange, mutate, summarise, group, and join data frames and tibbles. (Previous version) Updated 01/17.


Sparklyr Cheat Sheet

Sparklyr provides an R interface to Apache Spark, a fast and general engine for processing Big Data.  With sparklyr, you can connect to a local or remote Spark session, use dplyr to manipulate data in Spark, and run Spark’s built in machine learning algorithms. Updated 01/17.


R Markdown Cheat Sheet

R Markdown is an authoring format that makes it easy to write reusable reports with R. You combine your R code with narration written in markdown (an easy-to-write plain text format) and then export the results as an html, pdf, or Word file. You can even use R Markdown to build interactive documents and slideshows. Updated 02/16. (Old Version).


RStudio IDE Cheat Sheet

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. This cheat sheet will guide you through the most useful features of the IDE, as well as the long list of keyboard shortcuts built into the RStudio IDE. Updated 01/16.


Shiny Cheat Sheet

If you’re ready to build interactive web apps with R, say hello to Shiny. This cheat sheet provides a tour of the Shiny package and explains how to build and customize an interactive app. Be sure to follow the links on the sheet for even more information. Updated 01/16.


Data Visualization Cheat Sheet

The ggplot2 package lets you make beautiful and customizable plots of your data. It implements the grammar of graphics, an easy to use system for building plots. See for detailed examples. Updated 11/16.


Package Development Cheat Sheet

The devtools package makes it easy to build your own R packages, and packages make it easy to share your R code. Supplement this cheat sheet with, Hadley’s book on package development. Updated 01/15.


R Markdown Reference Guide

R Markdown marries together three pieces of software: markdown, knitr, and pandoc. This five page guide lists each of the options from markdown, knitr, and pandoc that you can use to customize your R Markdown documents. Updated 10/14.


Contributed Cheatsheets

These cheatsheets have been generously contributed by R Users.

Base R

Vectors, Matrices, Lists, Data Frames, Functions and more in base R by Mhairi McNeill. Updated 03/15.


Advanced R

Environments, data Structures, Functions, Subsetting and more by Arianne Colton and Sean Chen. Updated 02/16.


The Caret Package

Modeling and Machine Learning in R with the caret package by Max Kuhn. Updated 09/17.


Regular Expressions

Basics of regular expressions and pattern matching in R by Ian Kopacka. Updated 09/16.


The leaflet package

Interactive maps in R with leaflet, by Kejia Shi. Updated 05/17.


How big is your graph?

Graph sizing with base R by  by Stephen Simon. Updated 10/16.


The eurostat package

R tools to access the eurostat database, by rOpenGov. Updated 03/17.


The survminer package

Elegant survival plots, by Przemyslaw Biecek. Updated 03/17.


The sjmisc package

dplyr friendly Data and Variable Transformation, by Daniel Lüdecke. Updated 08/17.


The quanteda package

Quantitative Analysis of Textual Data in R with the quanteda package by Stefan Müller and Kenneth Benoit. Updated 09/17.



A reference to the LaTeX typesetting language, useful in combination with knitr and R Markdown, by Winston Chang. Updated 01/18.



Chinese Translations – 中文翻译

Ke Zhang has provided Chinese translations of the Sparklyr Cheatsheet: one in Simplified Chinese and one in Traditional Chinese.

Dutch Translations – Nederlandse Vertaling

Gern Huijberts has provided Dutch translations of the Data Wrangling, Package Development, Data Visualization, and R Markdown cheatsheets.

French Translations – Traductions Françaises

Vincent Guyader and Diane Beldame of ThinkR have provided French translations of the RStudio IDE,  Data Visualization, Data Wrangling, and Shiny cheatsheets.

German Translations – Deutsch Übersetzungen

Italian Translations – Traduzioni Italiane

Angelo Salatino of Knowledge Media Institute has provided Italian translations of the Package Development, R Markdown, and RStudio IDE cheatsheets.

Japanese Translations – 日本語翻訳

Korean Translations – 한국어 로 번역

Victor Lee of xwMOOC has provided Korean translations of the Package Development, R MarkdownCaret, and Purrr cheatsheets.

Portuguese Translations – tradução para português

Augusto Queiroz de Macedo has provided Portuguese translations of the Data Visualization, Data Wrangling, and RStudio IDE cheatsheets.

Russian Translations – Переводы

Spanish Translations – Traducciones en español

Turkish Translations – Türkçe Çeviriler

Ukrainian Translations – українські переклади

Evgeni Chasnovski of QuestionFlow has provided a Ukrainian translation of the Data Transformation cheatsheet.

Uzbek Translations – O‘zbek tilidagi tarjimalar

Alisher Suyunov has provided Uzbek translations of the Data Import and Data Transformation cheatsheets.

Vietnamese Translations – Bản dịch tiếng Việt

Anh Hoang Duc and Duc Pham of have provided Vietnamese translations of the Data Visualization, Data Wrangling, R Markdown, Shiny, Package Development, and Base R cheatsheets.

Previous versions

To find previous versions of the cheatsheets, including the original color coded sheets, visit the Cheatsheet GitHub Repository.

Want to contribute?

We accept high quality cheatsheets and translations that are licenced under the creative commons license. Details and templates are available at How to Contribute a Cheatsheet.