Sl NoPackageBrief IntroGithubVignette / TutorialNext Issue
1dedupewiderWe have all struggled with datasets containing duplicated entries. Removing the duplicated entries is NOT trivial. unique() is extremely helpful but not always. Here comes dedupewider. The package provides a function to find duplicated rows based on more than one variable. Here’s the package vignette — bookmark it for the next project!
2esquisseSomeone in France had this fantastic idea of having a drag and drop interface for generating plots. Why write lengthy ggplot2 codes when you can point and click? esquisse does that and also lets you save the relevant R code. Here’s the vignette; check it out for EDA!
3aRtsyThis week’s cover is art and painting. If Danielle’s essay was too complicated for you, here is a more accessible version. With aRtsy, you can generate artworks based on mathematical functions and tonnes of colours. You set a seed, choose the math and save the art. That’s it! Check out the vignette here.
4blogdownHave you ever thought of having an online presence? If you haven’t, watch this talk on how David Robinson got a job straight outta his PhD because of an answer he wrote on Stackoverflow. blogdown convince you to start it now. Following Alison Hill’s screencast, your website will be ready in two hours.
5ggmapggmap is an R package that makes it easy to retrieve raster map tiles from popular online mapping services like Google Maps and Stamen Maps and plot them using the ggplot2 framework.
6reticulateWhat if I told you that using Python with R is as simple as using only R? The reticulate package provides a comprehensive set of tools for interoperability between Python and R.
7tidygeocoderGeocoding addresses is complicated. tidygeocoder Is here to make it easier. The package provides a unified interface for performing both forward and reverse geocoding queries. Like, converting multi-line addresses to latitude-longitude combinations and vice versa. Thanks to multiple maps running in its background, you can even use this for finding the local Starbucks! Check the vignette here.
8tttThere are severe limitations to tables that R Markdown can produce. “The Table Tools!” (ttt) as it’s called, allows you to create formatted HTML tables flexibly and conveniently. This package differentiates between tables printed from data frames and those produced from actual analyses, allowing you to add extra headers and labels — with all the heavy-lifting done by CSS. Check the vignette here!
9rasterVisrasterVis complements the existing raster packages like raster and terra for visualisation. It provides methods for scatterplots, histograms and density plots, among others. There are more functions for spatiotemporal visualisation for time-series spatial data. Here is the vignette!
10runonceLengthy runtime analysis causes severe roadblocks in my workflow. I had to run some analysis for two days straight during my internship, and I forgot to save the results! You might already have a way to handle this (if so, share). runonce runs a code once and saves all the results for future access. The package is simple and easy to use.
11havenImport and Export 'SPSS', 'Stata' and 'SAS' Files
12rtweetTo stream, download or write tweets using R, you can use rtweet package. You need to be authenticated via a browser popup the first time you use rtweet and it’s a breeze afterwards.
13googlesheets4Google Sheets has quickly gained popularity because of its collaborative features. googlesheets4 provides the API interface from R. Check the vignette here.
14reprexProducing reproducible examples can solve half of your coding issues just like that! ٩(⁎❛ᴗ❛⁎)۶ reprex helps you prepare REPRoducible EXamples to share on GitHub, Stack Overflow, Slack or emails. Check the documentation here.
15raincloudplotsraincloudplots is a useful Raincloud plotting package. The trade-off is that you have less control for customisations than directly using ggplot2 that I linked earlier. However, if you want a short, sweet and fast method, check this out!
16DTThe R package DT provides an R interface to the JavaScript library DataTables. R data objects (matrices or data frames) can be displayed as tables on HTML pages, and DataTables provides filtering, pagination, sorting, and many other features in the tables.
17gtWith the gt package, anyone can make wonderful-looking tables using the R programming language. The gt philosophy: we can construct a wide variety of useful tables with a cohesive set of table parts. These include the table header, the stub, the column labels and spanner column labels, the table body, and the table footer.
18quantmodquantmod is a stock trading and finance package. It offers many functions for traders to explore, train, build and test their models. The package is surprisingly easy to use, and it’s FREE!
19BRRRLet Gucci Mane tell you when your script is done. I did not say that. That’s the package introduction. When you put in a long simulation to run, and you want to know when it is finally over, let BRRR put it to the world that you are done! This package provides a function that raps when your code runs successfully!
20DataEditRDataEditR is an R package that provides a visual interface with point and click capabilities to edit data frames like a spreadsheet software like Excel or Google Sheets.
21gtExtrasThe goal of gtExtras is to provide some additional helper functions to assist in creating beautiful tables with gt.
22covdatacovdata is a data package for R that collects and bundles datasets related to the COVID-19 pandemic from a variety of sources. (Note: Check out COVID19 package as well.)
23fixestThe fixest package offers a family of functions to perform estimations with multiple fixed-effects in both an OLS and a GLM context. Please refer to the introduction for a walk-through.
24conTextconText is a text analysis package designed for estimating and making statistical inference on context-specific word embeddings. If you work with textual datasets, check out the vignette here.
25jengajenga provides methods for extrapolation of univariate and multivariate time-series data using the k-nearest neighbours approach.
26patchworkpatchwork makes it ridiculously simple to append and combine multiple ggplots into one. Check it out!
27rayshaderrayshader makes astonishingly beautiful 3D plots. Not just that, it allows rotating the image from various angles so you can see the distribution. Kewl!
28easystatseasystats is a collection of R packages, which aims to provide a unifying and consistent framework to tame, discipline, and harness the scary R statistics and their pesky models.
29waiterLoading screens for Shiny; programmatically show and hide partial or full page loading screens with spinners or loading bars, see the demo and the cheat sheet .
30reportreport creates textual output from your statistical analyses to be directly used in your manuscripts. From statistical tables found using summary(), you generate a textual account of your results. You will end up using this for all your analyses.
31memoiseMemoization is an optimization technique that caches functions’ return values for the same inputs, saving on the expensive computation time. memoise gets it done in R.
32correlationcorrelation provides several methods for correlation computations like partial correlations, Bayesian correlations, multilevel correlations, polychoric correlations, biweight, robust correlations, among others. It also provides ways to visualize the same.
33ggfortifyAre you confused about which plots make sense for which analyses? ggfortify is here to help. The autopilot() provides capabilities like base R’s plot() to generate custom ggplot based model plots and more.
34xaringanAre you tired of using the same beamer templates or being unable to use mathematical formulas in Powerpoint? If yes, continue reading. Xaringan is an R package by Yihui Xie for creating slideshows through R Markdown. Since it is based on R Markdown, you can include dynamic R codes, tables and plots within the presentation!
35vapoRwaveggplot() themes can quickly get boring. Especially if you are making a plot for your Spotify listening history. How about using Vaporwave themes to rejuvenate your plots? Next time when you use R for anything except your dissertation, check this package.
36usemodelsTidymodels in R help in writing reproducible codes with minimal mistakes. However, they are really cumbersome to write. usemodels automatically generates much of this code infrastructure making tidymodels simple to write and implement. Check the vignette here.
37survivalmodelsThis package provides classical and machine learning methods for survival analysis. It also includes support for deep neural networks like Keras and tensorflow. Check the vignette here.
38fideliusfidelius provides methods for encrypting and protecting your HTML files generated from R Markdown. No other tool is needed, just this package.
39datapastaDatapasta is a package developed by Miles McBain that supports almost all inputs and outputs, including those that aren’t formatted as tables. You select a table-like text online, copy it and paste it in R as a data frame. No intermediate steps.
40tidymodelsTidymodels is an opinionated collection of packages for modelling and machine learning in R. It is based on Tidyverse principles and makes modelling consistent, flexible and scalable.
41ivregIf you are fed up with STATA errors like me and are looking for a more flexible approach to instrumental variables regression in R, check this package now.
42syuzhetSyuzhet is a text analysis package in R, which is notable for its simplicity. The package can quickly generate sentiment scores for a corpus of text while supporting many other visualization mechanisms.
43dlookrBefore jumping to analysis with real-world datasets, it is always good to explore it for any irregularities. dlookr provides diagnosis tools and wrappers to find the proportion of missing and unique values and outliers. The best part? It works for categorical variables too!
44quantedaquanteda provides the most comprehensive tools for text mining in R. It provides primary methods for importing textual datasets, performing basic operations, converting them to tokens, document-feature matrix. You can also use Naive Bayes and topic models for document classification and Wordscores, Wordfish and correspondence analysis for advanced use-cases.
45vistributionsWhile learning or exploring our data’s distribution, we may wish to visualize the shape of various statistical distributions. This package provides functions and a shiny app to visualize them.
46excluderIt provides methods for checking, marking and excluding rows based on standard exclusion criteria. Especially useful for datasets obtained from Qualtrics or Mechanical Turk.
47huxtableHuxtable is an R package to create LaTeX and HTML tables with a friendly, modern interface. This package offers the highest degree of control and more features than other table packages in R.
48readxlThe readxl package makes it easy to get data out of Excel and into R. Compared to many of the existing packages (e.g. gdata, xlsx, xlsReadWrite) readxl has no external dependencies, so it’s easy to install and use on all operating systems. It is designed to work with tabular data.
49unpivotrunpivotr deals with non-tabular data, especially from spreadsheets. Use this when readxl is not good enough.
50tidyxltidyxl imports non-tabular data from Excel files into R. It exposes cell content, position, formatting and comments in a tidy structure for further manipulation, especially by the unpivotr package. It supports the xml-based file formats ‘.xlsx’ and ‘.xlsm’ via the embedded RapidXML C++ library. It does not support the binary file formats ‘.xlsb’ or ‘.xls’.
51yorkrThis R package can be used to analyze performances of cricketers based on match data from Cricsheet. The yorkr package can handle match data from ODIs, Twenty20s and IPL T20s from Cricsheet.
52cricketrThis R package can be used to analyze performances of cricketers based on stats from ESPN Cricinfo.
53filebinDo you frequently share files and data for analysis that are not sensitive? Filebin allows you to upload and share a file. The file can then be deleted at any time and, if not manually deleted, they will be automatically removed after six days.
54dtplyrAdvanced users of R would understand the benefits of using data.table for handling data frames in R. They are fast and efficient in handling memory. dtplyr gives the ability to handle data.table using dplyr syntax: a win-win.
55imagesegThis package provides a general-purpose workflow for image segmentation and deep learning models. Based on Ronnerberger et al. (2015), the package offers binary and multi-class segmentation methods based on grayscale or colour images.
56MetBrewerThis package contains palettes inspired by works at the Metropolitan Museum of Art in New York. All pieces selected come from various time periods, regions, and mediums.
57ggxThis package is a helper for plotting with ggplot2. It can convert your request in English to “rotate x-axis labels by 90 degrees” to ggplot2-speak.
58IndiaPINTwo days ago, I was bored and decided to write a dataset package for Indian PIN codes (equivalent to ZIP codes). IndiaPIN has PIN codes for all postal offices in India with their geographic details, including longitude and latitude.
59pingrSometimes, you need to check if a remote computer or web server is up and running. ping() from pingr allows you to do that.
60archiveWhen you need to compress your output files straight from R, do so with archive() from the archive package.
61flexdashboardflexdashboard provides methods to make easy interactive dashboards using R Markdown. It supports related visualisations in a single pane, htmlwidgets, flexible and straightforward layouts for organisation, Shiny apps, and a creative "storyboard" layout for presenting a sequence of visualisations with commentary.
62rbokehrbokeh provides methods to create interactive web-based plots in R. Each point in the plot is clickable where you can see more information and you can even use your mouse to select a portion of the graph to magnify.
63dygraphsdygraphs provide methods for interactive and automatic plotting of time series objects in R. It is highly configurable and provides zoom, highlighting, shaded regions and point to point annotations.
64insightinsight provides methods to recover intermediate information when developing a model — beyond coefficient estimates and estimates of fit. It supports 200+ models currently.
65ggstatsplotStatistical tests are commonly used in research to showcase results from analyses. ggstatsplot joins modelling with visualisation to create graphics with statistical details.
66plotlyplotly is an R package for interactive web-based plots in R. You can click on a point to learn more, pinch to zoom, and all other familiar gestures work as well. Check the guidebook for different plots you can make.
67DataEditRDataEditR is an interactive editor for viewing, filtering, selecting and editing data frames in R. Check the third story in this letter to know more.
68spiralizespiralize is a visualisation plot to create Archimedean spiral plots in R. See the fifth story in this letter to know more.
69pavopavo provides several tools to manage the spectral and spatial analysis of colour patterns. It provides flexible solutions to input spectral data, processes it, extracts variables and produces graphics among others.
70tmaptmap is a package to produce thematic maps in R. The syntax for creating plots is similar to that of ggplot2 but tailored to maps. Check the vignette to learn more.
71mlr3R does not provide standardised methods for machine learning models. mlr3 is an attempt to standardise methods using an object-oriented approach. (I’m not sure how this compares with tidymodels though).
72ggforceggforce is ggplot2 on steroids. It aids ggplot2 through several functions that add additional functionalities on what’s possible.
73DeducerThis is not for you. It is for your friend who likes GUI and hates programming. Deducer is an (old) GUI for R that supports many SPSS-like functions with a GUI and R in the background.
74fuzzyjoinThis package provides methods for non-exact joins between tables. You can fuse tables of text full of misspellings, for example.
75ggtechggtech provides several themes for ggplot2 based on how big technology companies present their data. I especially liked how Airbnb does that and have incorporated some in my theme. Check the vignette here.
76RobynRobyn is an experimental, semi-automated, open-sourced, open-sourced Marketing Mix Modeling (MMM) package in R from Facebook Marketing Science. It uses various machine learning techniques to define media channel efficiency.
77powerjoinIn the last edition, I talked about fuzzyjoin, which gives capabilities for non-exact joins. powerjoin is an improvement over it by adding additional checks, among other things. Check the vignette here.
78TTRDo you want to build a personal stock trading tool? If yes, TTR is here to help. It provides a collection of 50+ stock trading indicators to design trading rules. Check the documentation here.
79fcukA package designed to help people with clumsy fingers who make a lot of minor typographical errors. It shows you possible mistakes and how to correct them. See the vignette here.
80xkcdYou would’ve likely stumbled on some xkcd comic sometime, or you may be a sincere reader of the same. This package creates xkcd like plots in R. It is pretty basic, but nothing can beat a good dose of humour in the boring slides.
81erroristThis package can search for your error messages the second they occur. So, no need to copy and paste the error message on Google.
82correlationCorrelation is one of the first analyses we try when presented with new data. Unfortunately, cor() in R is very limited. This package has all you could ask for, and then some more. Even pretty visualisations!
83ggbumpggbump is an R package that creates elegant bump charts. Bump charts are suitable for plotting rank changes over time.
84graphlayoutsThis package implements some network and graph layouts that are not directly available in igraph. This is usually used in conjugation with ggraph.
85waffleWaffle charts are square charts used to represent parts of a whole for categorical quantities. This is an excellent tool to present proportions.
86ggThemeAssistWhen you want to modify your ggplot2 theme but you don’t know all the parameters to adjust, this RStudio add-in can help.
87tidylogtidylog provides live feedback on dplyr operations. dplyr operations work in the background and we don’t exactly know what manipulations happened. Just by attaching the tidylog package, you can get elaborated details on your wrangling.
88geomtextpathgeomtextpath provides methods to use curved paths with text instead of lines. geom_text plots text as points. This library provides functions to use sentences as lines.
89anomalizeDetecting anomalies is not trivial. A simple (yet popular) approach is to identify observations two standard deviations away from the mean as anomalies. This package provides methods to detect anomalies in general data as well as time-series data. Finance enthusiasts: run to detect hints of economic turbulence.
90ggCyberPunkSo you want to impress geeks at your company with cyberpunk-styled plots. This package is here to help.
91-Today, I’m writing about forty packages instead of four. Joseph Rickert writes a monthly blog on R Views about the top 40 packages of that month. Last month, he published an article about CRAN’s “Golden Oldies” and “One Hit Wonders”. Golden Oldies are classics that continue to get a lot of air time. One Hit Wonders are old packages that never updated but continue to be popular.
92lifecyclelifecycle package provides tools and conventions to manage the life cycle of your exported functions from Tidyverse. The best way to learn about it is through Hadley’s talk.
93naniarHandling missing values is tedious. This package is here to simplify it. Check the vignette here.
94gtMy favourite package to create LaTeX, HTML and RTF tables in R. You can include them in R Markdown and literally everywhere you use tables (except Excel, yet…). Check the website here.
95summarytoolsOne of the first things when starting with a new dataset is creating it’s a summary table. This package significantly simplifies the process. You’ll love it. Check the vignette here.