If you know me or have worked with me, you will know that I am a huge advocate for cheatsheets. I think they are essential additions to any technical professional’s toolkit and can save you hours of time. Either in digital pdf forms or hard copies on your desk, cheatsheets can really speed up the learning process and is godsend for multi-linguists like me who want to navigate the subtle differences between programming languages like conditional logic syntax, variable declarations or writing user-defined functions.
That’s why I’m introducing a new segment on the blog where we look at some useful cheatsheets I’ve come across or created myself for Programming languages, IDEs and tools. These are by no means exhaustive lists but provide a good start to learning about these technologies. Today, we look at the R programming language.
Essential R cheatsheets
Data Transformation with dplyr
If you haven’t used dplyr before, it’s a very useful package which enables you to write very clear data manipulation commands that can be piped together in a succinct and readable format. It’s one of the first packages I load into the IDE. This cheatsheet has been created by Rstudio
Data Visualisation with ggplot2
ggplot2 is a very useful package that enables you to visualise data in a modular way. The library makes it easy to add aesthetics and layers of elements on top of the vizzes. This library is one of the most popular R libraries for plots and happens to be the cheat sheet that I use the most. I recommend this one highly. Created by Rstudio
Rstudio IDE
Rstudio is the most popular IDE for the R Language. It offers features to write, read and run R code; collaborate via version control and also has the functionality to create R documents, shiny apps and build packages. Rstudio has all the features you need to get started with R and this cheatsheet is just what you need to start familiarising yourself with the IDE. Created by Rstudio
Data Import with readr
readr provides an easy and fast way to read data from flat files. readr functions are upto 10x faster than the base R alternatives and offer high readability and modularity like other packages in the tidyverse. Note: if your project requires the best possible performance, consider using the data.table::fread() instead. Created by Rstudio
String Operations with stringr
If you’ve done any sort of data cleaning or preparation before, you would know that String Operations make up the majority of the time and effort spent on cleansing data. stringr provides an elegant set of functions for string manipulation. This package has saved me hours of time and is a must-use in almost every data workflow. This cheatsheet has been created by Rstudio
Regular Expressions
Regular expressions (or regex) have emerged as a staple in a past few years due to it’s useful applications in web scraping and text mining. It can take a bit of time before you get comfortable using them but they are a very useful addition to any text processing toolkit. This cheat sheet lists the basic syntax and has been created by Ian Kopacka.
R Markdown
RMarkdown is a file format for making dynamic documents with R, enabling you to write comprehensive, reproducible and reusable reports. It allows you to enhance your R code with narrations written in Markdown, display plots/charts and export the file as a variety of output formats. This cheatsheet and Reference guide has been created by Rstudio
Shiny
Shiny is an open source package that enables you to build powerful web applications using R. I use the shiny framework as part of my EDA workflow and is the most intuitive way to add interactivity to analyses built with R. If you haven’t come across Shiny before, I would highly recommend you check it out. Created by Rstudio
Package Development
The R universe is packed with very useful packages written by very talented professionals but if you need to create your own at some point in time, this cheat sheet has you covered. The cheatsheet has well laid out guidelines about different aspects of the package building process using the devtools package. This cheatsheet has been created by Rstudio