Skip to content
R for the Rest of Us Logo

Resources

This carefully curated collection of resources will help you find packages and learning resources to help you on your R journey.

Screenshot of flextable

flextable

The flextable package provides a framework for easily creating tables for reporting and publications in R. It allows for easy formatting and customization of tables, and supports various output formats including HTML, PDF, Word, PowerPoint, and more. The package also provides functions for tabular reporting of statistical models and the creation of complex cross tabulations.

Go to Resource
Screenshot of Flowcharts made easy with the package {flowchart}

Flowcharts made easy with the package {flowchart}

The {flowchart} package in R facilitates the creation of flowcharts, particularly useful in health research to show participant flow in studies. It integrates with the tidyverse workflow, offering customizable functions that work with pipe operators. Unlike other packages, it adapts flowcharts automatically to the data, enhancing reproducibility. The post explains installation, initialization, and drawing processes using the SAFO clinical trial dataset. It's easy to produce complex flowcharts without manual parameter setting thanks to the package's tidyverse-centric design.

Go to Resource
Screenshot of Flowcharts with ggplot2 • ggflowchart

Flowcharts with ggplot2 • ggflowchart

The {ggflowchart} package for R is a specialized tool designed to create flowcharts using the {ggplot2} framework with simplicity and minimal effort. You can install either the stable CRAN release or the development version from GitHub. Users can generate basic flowcharts by defining start and end points of edges within a data frame, and then invoking the ggflowchart() function. Additional customization is possible through aesthetic mappings such as fill, text color, and future updates may introduce further options. The package also encourages contributions, setting guidelines for pull requests including passing checks and following best practices in development.

Go to Resource
Screenshot of Focus and feedback in the tidyverse

Focus and feedback in the tidyverse

This content features Tracy Teal interviewing Hadley Wickham for Open Source Stories, discussing the tidyverse's history and its influences. Hadley reflects on his parents' influence and his role as Posit's Chief Scientist in making data science more accessible. Themes include early computing exposure, relational databases, tidy data principles, and the balance between assisting and imposing solutions. Personal anecdotes highlight how Hadley's upbringing shaped the development of tidyverse tools aimed at simplifying and tidying data in R.

Go to Resource
Screenshot of For fs – Notes from a data witch

For fs – Notes from a data witch

The blog post discusses the 'fs' R package, which provides a cross-platform interface for filesystem operations, replacing base R functions like file.path(). Despite the belief that such a package is boring, the author emphasizes the hidden nuances and pitfalls in seemingly simple tasks like specifying file paths. The post illustrates the benefits of using fs's path() function over paste() to avoid errors in large projects where file paths could become complex to handle. The inclusion of a conversation with the author's alter ego adds humor, portraying the challenge in writing about a technical and unglamorous tool.

Go to Resource
Screenshot of forcats

forcats

Tools for working with categorical variables (factors) in R.

Go to Resource
Screenshot of formattable

formattable

This package is designed for applying formatting on vectors and data frames to make data presentation easier, richer, more flexible and hopefully convey more information.

Go to Resource
Screenshot of Formatted Spreadsheets to gts • forgts

Formatted Spreadsheets to gts • forgts

The forgts package provides a way to convert spreadsheets into gt tables while preserving cell and text formatting from the original file. It supports a variety of format attributes, including font styles, cell fills, and borders, but intentionally ignores header formatting. This tool iterates over the gt defaults to apply necessary styling. Useful in data reporting and visualization, forgts allows easy installation from GitHub and seamless integration with RMarkdown and Quarto, completed by exporting functionalities with gt::gtsave(). It facilitates creating visually consistent tables for analysis and presentation within the R ecosystem.

Go to Resource
Screenshot of Four ways to write assertion checks in R

Four ways to write assertion checks in R

This content provides a personal narrative detailing the importance of writing assertion checks in R, particularly when dealing with data that can change structure over time. The author shares a transformation from a confident young analyst to one who has learned to be cautious and employ defensive programming techniques. The focus is on the 'identifier' function, illustrating the need for assertions with 'stopifnot()' to handle unexpected and incorrect inputs. The article emphasizes rigorous validation of assumptions to prevent silent errors in code.

Go to Resource

Full-Stack Survey Research with SurveyMonkey • svmkR

This package provides a suite of tools to work with SurveyMonkey surveys in R.

Go to Resource
Screenshot of Full-Stack Survey Research with SurveyMonkey • svmkR

Full-Stack Survey Research with SurveyMonkey • svmkR

svmkR is an R package that provides a comprehensive toolkit for managing SurveyMonkey surveys within the R programming environment. It enables users to create, upload, download, and analyze surveys directly from R. Users can calculate margins of error, apply statistical survey weights through raking, and generate SurveyMonkey-style banner presentations for polls. The package is installed from GitHub and serves as a full-stack survey research solution. The source is available on GitHub, and the package was developed by a team of contributors, building on the surveymonkey package by enhancing and refactoring it.

Go to Resource
Screenshot of Functions and Themes for gt tables

Functions and Themes for gt tables

A tutorial on using functions and themes for creating gt tables in R language.

Go to Resource