• Stars
    star
    5,540
  • Rank 7,032 (Top 0.2 %)
  • Language
    TeX
  • License
    Creative Commons ...
  • Created over 7 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Posit Cheat Sheets - Can also be found at https://posit.co/resources/cheatsheets/.

Posit Cheatsheets

The cheatsheets make it easy to learn about and use some of our favorite packages. They are published in their respective PDF versions here: https://posit.co/resources/cheatsheets/, some are also available in the RStudio IDE under Help > Cheatsheets.

We are also starting to make some cheatsheets available in a more accessible, text-based HTML format. These are available at https://rstudio.github.io/cheatsheets/.

This repository contains the source files of the current, archived and translated versions.

The cheatsheets use the creative commons copyright. Please see the LICENSE document for more details.

Translations

If you wish to contribute to this effort by translating a cheatsheet, please feel free to use the source Keynote file. To submit a translation, please use a Pull Request via GitHub. See the contributing guidelines for more information.

HTML cheatsheets

If you wish to provide an HTML cheatsheet version, please create a Pull Request with a new .qmd file in the html/ directory of this repository. Use one of the existing qmd files there as a starting point/template. These should not be duplicates of the pdf versions - they should be text-based so they are more accessible to people with visual impairments. Use of images should be minimized, and any images should include appropriate alternative text.

Tips for making a new cheatsheet

Cheatsheets are not meant to be text or documentation! They are scannable visual aids that use layout and visual mnemonics to help people zoom to the functions they need. Think of cheatsheets as a quick reference, with the emphasis on quick. Here's an analogy:

A cheatsheet is more like a well-organized computer menu bar that leads you to a command than like a manual that documents each command.

Everything about your cheatsheet should be designed to lead users to essential information quickly. If you are summarizing the documentation manual, you are doing it wrong! Here are some tips to help you do it right:

Getting Started

  1. RStudio cheatsheets are hosted at https://github.com/rstudio/cheatsheets. You can submit new cheatsheets to the repository with a pull request. See the contributing guidelines for more information.

  2. The files keynotes/0-template.key and powerpoints/0-template.ppt are official templates that contain some helpful tips.

  3. You may find it easiest to create a new cheatsheet by duplicating the most recent Keynote / Powerpoint cheatsheet and then heavily editing it—that's what I do!

Process

Budget more time than you expect to make the sheets. So far, I've found this process to be the least time consuming:

  1. Identify which functions to include by reading the package web page and vignettes. I try to limit my cheatsheets to the essentials.

  2. Organize the functions into meaningful, self-explanatory groups. Each group should address a common problem or task.

  3. Think about how to visualize the purpose of each function. Visual mnemonics are easier to scan than text, which all looks the same.

  4. Think about what key mental models, definitions, or explanations the cheatsheet should contain in addition to the functions. Ideally, use these to explain the visualizations.

  5. Sketch out several possible layouts for the sheet. Take care to put the more basic and/or pre-requisite content above and to the left of other content. Try to keep related content on the same side of the page. often your final layout will itself be a "mental map" for the topic of the cheatsheet.

  6. Type out all of the explanations and function descriptions that you plan to include. Lay them out. Use placeholders for the visuals. Verify that everything fits. White space is very important. Use it to make the sheet scannable and to isolate content groups. Retain white space, even if it means smaller text.

  7. Make the visuals. They take the longest, so I save them for last or make them as I do step 6.

  8. Tweak until happy.

Visual Design

  1. Use the existing theme that you see in the cheatsheets. It is cohesive and black and white printer friendly.

  2. Choose a highlight color to use throughout your cheatsheet, and repeat this highlight color in the background of the top right corner. Ideally you could find a color that is different enough from the other cheatsheets that you can quickly tell yours apart when flipping through a booklet of cheatsheets.

  3. Use a second color sparingly or not at all to draw attention to where it is needed and to differentiate different groupings of content.

  4. Include lots of white space.

  5. Visually differentiate groups of content. Backgrounds, boxes, side bars, and headers are helpful here. It is very useful for the user to know immediately where one group of content begins and where one ends. Our "gradation headers" fail here, so think of better solutions if possible.

  6. Align things to guides, i.e. align things across the page. It helps define the white space and makes the cheat more orderly and professional.

  7. Make the text no smaller than ~10pt.

  8. If the letters are white on a colored background, make the font thicker - semibold or bold.

  9. Save bold text for simple, important statements, or to draw scanning eyes to important words, such as words that identify the topic discussed. Don't make an entire paragraph bold text.

Content

  1. Include a hex sticker, IDE screenshot, or other branding material. The cheatsheets have a second function as marketing material.

  2. Include a Creative Commons Copyright to make the sheet easy to share. You'll find one baked into every cheatsheet and the template.

  3. Be very concise - rely on diagrams where possible.

  4. Pay attention to the details! Your readers sure will... so be correct.

  5. If in doubt, leave it out. There is a documentation manual after all.

  6. Code comments inform, but fail to draw the readers attention. It is better to use arrows, speech bubbles, etc. for important information. If it is not important information, leave it out.

  7. Simple working examples are more helpful than documentation details. They meet the user at his or her pain points, demonstrating code, and reminding users how to run it, with the least context shifting.

  8. Add some concise text to help the user make sense of your sections and diagrams. Images are best, but readers need to be able to interpret them.

Summary

Your cheatsheet has two goals. First, to help users find essential information quickly, and second, to prevent confusion while doing the above. Your best strategy will be to limit the amount of information you put into the cheatsheet and to lay that information out intuitively and visually. This approach will make your cheatsheet equally useful as a teaching tool, programming tool, or marketing tool.

Cheatsheets fall squarely on the human-facing side of software design. They focus on human attention. What does that mean? When you write documentation, your job is to fill in all of the relevant details—that's a software facing job, you need to know the software to do it. You assume that interested humans will find their way to your details on their own (and understand them when they do!). When you make a cheatsheet, your job flips. You assume that the relevant details already exist in the documentation. Your job is to help interested humans find them and understand them. Your job is to guide the human's attention. Don't just write, design.

Website

This repo is deployed as a quarto website at https://rstudio.github.io/cheatsheets/. It uses renv to manage the dependencies to render the site (in particular the html/*.qmd files that generate the HTML cheatsheets). Packages that are required to render these cheatsheets should be list in DESCRIPTION so that they are reliably discovered by renv::snapshot().

We prefer the Quarto cheatsheets to set eval: true and output: false in the execute options (vs eval: false) as this helps to ensure the code in them still works when they are rerun. Exceptions can be made on a per-chunk basis, and some (e.g., keras) are not really feasible to run all the time due to complex installation.

More Repositories

1

shiny

Easy interactive web applications with R
R
5,209
star
2

rstudio

RStudio is an integrated development environment (IDE) for R
Java
4,432
star
3

bookdown

Authoring Books and Technical Documents with R Markdown
JavaScript
3,613
star
4

rmarkdown

Dynamic Documents for R
R
2,737
star
5

shiny-examples

JavaScript
1,927
star
6

gt

Easily generate information-rich, publication-quality tables from R
R
1,892
star
7

blogdown

Create Blogs and Websites with R Markdown
R
1,694
star
8

reticulate

R Interface to Python
R
1,604
star
9

webinars

Code and slides for RStudio webinars
HTML
1,510
star
10

rticles

LaTeX Journal Article Templates for R Markdown
TeX
1,402
star
11

plumber

Turn your R code into a web API.
R
1,355
star
12

tensorflow

TensorFlow for R
R
1,313
star
13

renv

renv: Project environments for R.
R
953
star
14

pagedown

Paginate the HTML Output of R Markdown with CSS for Print
R
861
star
15

shinydashboard

Shiny Dashboarding framework
CSS
852
star
16

pointblank

Data quality assessment and metadata reporting for data frames and database tables
R
824
star
17

keras

R Interface to Keras
R
818
star
18

flexdashboard

Easy interactive dashboards for R
JavaScript
788
star
19

leaflet

R Interface to Leaflet Maps
JavaScript
784
star
20

rmarkdown-book

R Markdown: The Definitive Guide (published by Chapman & Hall/CRC in July 2018)
RMarkdown
738
star
21

ggvis

Interactive grammar of graphics for R
R
709
star
22

shiny-server

Host Shiny applications over the web.
JavaScript
700
star
23

rstudio-conf

Materials for rstudio::conf
HTML
696
star
24

learnr

Interactive Tutorials with R Markdown
R
695
star
25

RStartHere

A guide to some of the most useful R Packages that we know about
R
656
star
26

py-shiny

Shiny for Python
Python
627
star
27

DT

R Interface to the jQuery Plug-in DataTables
JavaScript
581
star
28

rmarkdown-cookbook

R Markdown Cookbook. A range of tips and tricks to make better use of R Markdown.
RMarkdown
562
star
29

blastula

Easily send great-looking HTML email messages from R
R
522
star
30

r2d3

R Interface to D3 Visualizations
R
513
star
31

bookdown-demo

A minimal book example using bookdown
CSS
476
star
32

hex-stickers

RStudio hex stickers
R
434
star
33

distill

Distill for R Markdown
HTML
416
star
34

bslib

Tools for theming Shiny and R Markdown via Bootstrap 3, 4, or 5.
SCSS
414
star
35

packrat

Packrat is a dependency management system for R
R
394
star
36

tufte

Tufte Styles for R Markdown Documents
R
385
star
37

dygraphs

R interface to dygraphs
JavaScript
361
star
38

revealjs

R Markdown Format for reveal.js Presentations
JavaScript
316
star
39

pins-r

Pin, Discover and Share Resources
R
299
star
40

fontawesome

Easily insert FontAwesome icons into R Markdown docs and Shiny apps
R
287
star
41

profvis

Visualize R profiling data
JavaScript
285
star
42

crosstalk

Inter-htmlwidget communication for R (with and without Shiny)
JavaScript
284
star
43

config

config package for R
R
247
star
44

pool

Object Pooling in R
R
242
star
45

thematic

Theme ggplot2, lattice, and base graphics based on a few simple settings.
R
237
star
46

Intro

Course materials for "Introduction to Data Science with R", a video course by RStudio and O'Reilly Media
R
234
star
47

tinytex-releases

Windows/macOS/Linux binaries and installation methods of TinyTeX
PowerShell
226
star
48

shinytest

Automated testing for shiny apps
JavaScript
222
star
49

httpuv

HTTP and WebSocket server package for R
C
217
star
50

nomnoml

Sassy 'UML' Diagrams for R
JavaScript
216
star
51

shinymeta

Record and expose Shiny app logic using metaprogramming
R
212
star
52

htmltools

Tools for HTML generation and output
R
201
star
53

shinyuieditor

A GUI for laying out a Shiny application that generates clean and human-readable UI code
JavaScript
200
star
54

promises

A promise library for R
R
193
star
55

vetiver-r

Version, share, deploy, and monitor models
R
175
star
56

rstudioapi

Safely access RStudio's API (when available)
R
161
star
57

gradethis

Tools for teachers to use with learnr
R
159
star
58

concept-maps

Concept maps for all things data science
HTML
158
star
59

master-the-tidyverse

Course contents for Master the Tidyverse
156
star
60

shinythemes

Themes for Shiny
R
152
star
61

ShinyDeveloperConference

Materials collected from the First Shiny Developer Conference Palo Alto, CA January 30-31 2016
HTML
152
star
62

chromote

Chrome Remote Interface for R
R
145
star
63

shiny-gallery

Code and other documentation for apps in the Shiny Gallery ✨
HTML
140
star
64

sortable

R htmlwidget for Sortable.js
R
124
star
65

rsconnect

Publish Shiny Applications, RMarkdown Documents, Jupyter Notebooks, Plumber APIs, and more
R
120
star
66

reactlog

Shiny Reactivity Visualizer
JavaScript
119
star
67

redx

dynamic nginx configuration
Lua
118
star
68

bigdataclass

Two-day workshop that covers how to use R to interact databases and Spark
R
114
star
69

r-system-requirements

System requirements for R packages
Shell
111
star
70

shinyapps

Deploy Shiny applications to ShinyApps
110
star
71

webshot2

Take screenshots of web pages from R
R
109
star
72

shinyloadtest

Tools for load testing Shiny applications
HTML
108
star
73

shinyvalidate

Input validation package for the Shiny web framework
JavaScript
108
star
74

r-docker

Docker images for R
Dockerfile
105
star
75

miniUI

R
102
star
76

sass

Sass compiler package for R
C++
102
star
77

shinytest2

R
98
star
78

keras-customer-churn

Customer Churn Shiny Application
R
98
star
79

r-builds

an opinionated environment for compiling R
Shell
91
star
80

r-manuals

A re-styled version of the R manuals
R
85
star
81

addinexamples

An R package showcasing how RStudio addins can be registered and used.
R
85
star
82

shinyapps-package-dependencies

Collection of bash scripts that install R package system dependencies
R
74
star
83

markdown

The first generation of Markdown rendering for R (born in 2012). Originally based on the C library sundown. Now based on commonmark. Note that this package is markdown, not *rmarkdown*.
R
72
star
84

R-Websockets

HTML 5 Websockets implementation for R
R
68
star
85

webdriver

WebDriver client in R
R
68
star
86

beyond-dashboard-fatigue

Materials for the RStudio webinar 'Beyond Dashboard Fatigue'
R
66
star
87

cloudml

R interface to Google Cloud Machine Learning Engine
R
65
star
88

shinylive

Run Shiny on Python (compiled to wasm) in the browser
TypeScript
61
star
89

rstudio-conf-2022-program

rstudio::conf(2022, "program")
R
61
star
90

rstudio-docker-products

Docker images for RStudio Professional Products
Just
59
star
91

bookdown.org

Source documents to generate the bookdown.org website
R
59
star
92

education.rstudio.com

CSS
57
star
93

tfestimators

R interface to TensorFlow Estimators
R
57
star
94

vetiver-python

Version, share, deploy, and monitor models.
Python
55
star
95

tfprobability

R interface to TensorFlow Probability
R
54
star
96

sparkDemos

HTML
53
star
97

shiny-incubator

Examples and ideas that don't belong in the core Shiny package and aren't officially supported.
JavaScript
53
star
98

connections

https://rstudio.github.io/connections/
R
52
star
99

swagger

Swagger is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
HTML
51
star
100

leaflet.mapboxgl

Extends the R Leaflet package with a Mapbox GL JS plugin to allow easy drawing of vector tile layers.
R
49
star