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 Render media to different formats • renderthis

Render media to different formats • renderthis

The package 'renderthis' (formerly 'xaringanBuilder') enables users to render R Markdown and Quarto documents into various formats like HTML, PDF, PNG, GIF, PPTX, and MP4. It specifically caters to xaringan or revealjs slide presentations and includes a 'social' output optimized for sharing on social media. Installation requires dependencies and a local Google Chrome browser. It simplifies rendering with functions prefixed by to_*() requiring a source file path. Additional dependencies are needed for certain formats, with instructions provided for each case. The package supports an efficient workflow for preparing presentations for diverse sharing and publication purposes.

Go to Resource
Screenshot of Reproducible Data Science in R: Writing functions that work for you

Reproducible Data Science in R: Writing functions that work for you

This blog post from the Water Data For The Nation Blog guides readers on crafting custom functions in R for reproducible data science, particularly with water-related data. Starting from the basics, it emphasizes the benefits like consistency, error reduction, and code shortening by avoiding repeated tasks. The post covers function essentials and environments in R, providing a step-by-step tutorial using the Water Quality Portal data. It prepares readers for advanced function usage in R, targeting those with basic programming experience aiming to advance their skills.

Go to Resource
Screenshot of RStudio Projects and Working Directories: A Beginner's Guide

RStudio Projects and Working Directories: A Beginner's Guide

This blog post provides a basic introduction on how to use RStudio Projects and structure your working directories. It explains why RStudio projects are important and the advantages of using them over setwd(). The post also covers how RStudio projects make file paths relative, making it easier to reference files within the project. It includes practical examples and personal advice for beginners in R programming.

Go to Resource
Screenshot of RStudio Shortcuts and Settings

RStudio Shortcuts and Settings

Albert Rapp provides a guide for maximizing productivity in RStudio with shortcuts and settings. This post covers visual adjustments like themes, legibility improvements, and editor configurations, alongside tips for efficient code execution, debugging, and navigation. Rapp emphasizes starting with a clean environment, highlights key shortcuts for coding basics, file searching, command palette, and session management. The aim is to enhance user experience, reduce reliance on the mouse, and improve coding workflow. Ideal for R users looking to streamline their RStudio setup.

Go to Resource
Screenshot of Sh*tty R help from sh*tty AI

Sh*tty R help from sh*tty AI

The blog post from rostrum.blog critiques the proliferation of R help websites that use low-quality AI-generated content to exploit vulnerable learners for profit. The author observes these sites featuring predatory practices such as affiliate marketing without providing valuable help, producing numerous pages with slightly altered content for SEO gains, and dishonestly attributing authorship to non-existent human writers. The post warns readers to be cautious and recognize that these sites offer poor advice, often including incorrect or non-functional code, and may feature content pirated from legitimate creators without consent.

Go to Resource

Tips for debugging and cleaning broken code

This guide provides strategies for debugging and cleaning broken R code, specifically in a data visualization context using 'dplyr' and 'ggplot2'. It helps identify common mistakes in function chaining and plot layering, offering tips on how to spot and fix errors such as misspelled words or misplaced punctuation. The article illustrates the debugging process using an example with incorrect R code, followed by the corrected version. The guide emphasizes the importance of code formatting and reindenting for troubleshooting, making the debugging process less daunting.

Go to Resource
Screenshot of Using project scripts to keep Quarto source and output files organised

Using project scripts to keep Quarto source and output files organised

Pete Jones shares a tip for organizing Quarto project files, focusing on separating source (.qmd) and output (.pdf, .html) files when source files are stored in subdirectories. This is a particular challenge due to Quarto's default behavior of placing output files next to their source. The article discusses project-based workflows, the issues with Quarto subdirectories, and leverages Quarto features to solve the problem. A scripted solution is presented to ensure outputs are organized in a specified directory, maintaining a clean project structure even with source files in subdirectories.

Go to Resource
Screenshot of Where are the 4+-car households?

Where are the 4+-car households?

Harald Kliems investigates the prevalence of 4+-car households in the 100 most populous US cities using data from the American Community Survey. The blog post highlights the spatial distribution of such households and contrasts the top and bottom ten cities in terms of the percentage of 4+-car ownership. Key R packages used in the analysis include tidyverse, tidycensus, tigris, gt, and tmap. This examination into the facets of American car ownership is accompanied by visualizations such as maps and tables, enabling deeper insights into the data.

Go to Resource
Screenshot of Winners of the Posit Closeread Prize - Data-Driven Scrollytelling with Quarto

Winners of the Posit Closeread Prize - Data-Driven Scrollytelling with Quarto

This blog post discusses the winners of the Closeread Prize, featuring data-driven scrollytelling stories created with Quarto. The Closeread Prize challenged participants to craft compelling web narratives that unfold with user scroll, using the Quarto Closeread extension. Submissions spanned various topics and tools, with 40 entries exhibiting a mix of narrative, visuals, and technical prowess. Judges from diverse backgrounds evaluated the entries for narrative quality, scrollytelling suitability, visual polish, and technical achievement. The grand prize and special prizes highlighted the exceptional use of scrollytelling, technical skill, visual elegance, and integration of dynamic data visualization.

Go to Resource
Screenshot of Writing beautiful code

Writing beautiful code

This content is a comprehensive guide on writing aesthetically pleasing and maintainable code, with a focus on R programming. The author, Ma"elle Salmon, explains the importance of beautiful code for readability and collaboration. The guide includes practical tips and tricks, and emphasizes adherence to coding styles, proper spacing, avoiding overly long lines, and creating descriptive functions. Additionally, the author discusses reducing unnecessary comments and documenting functions effectively. The guide also covers using tools like {styler} for automatic formatting and encourages learning from others' code to extend one's R vocabulary.

Go to Resource