Resources
This carefully curated collection of resources will help you find packages and learning resources to help you on your R journey.
Use of flextable – Notes from a data witch
This content intertwines a tutorial on using the flextable package in R with personal reflections on the book 'Use of Weapons' by Iain Banks. It starts with a nostalgic recollection from the author's past, and leads into an exploration of crafting tables in R. The post integrates a fondness for the Culture novels by Banks, touching upon aspects of storytelling within a technical guide. The aim is to show how the flextable package enhances data representation, paralleling the way stories weave narratives, thereby making data more approachable and engaging, just like a good science fiction universe.
Go to Resource
Use SAS, R, and quarto Together • sasquatch
sasquatch is an R package that enables the integration of SAS, R, and Quarto for creating reproducible multilingual reports. It utilizes SASPy and reticulate to run SAS code blocks within R, transfer data between SAS and R, perform SAS client file management, and render SAS output in quarto documents. The package includes installation instructions for development version, Python, and SASPy. It offers functionality such as interactive execution of SAS code, data conversion between R and SAS, and rendering quarto documents with SAS output, distinguishing it from similar packages like sasr, configSAS, and SASmarkdown.
Go to Resource
Use SAS, R, and quarto together with sasquatch
sasquatch is a package that allows the integration of SAS, R, and Quarto to create reproducible multilingual reports. The package facilitates running SAS code blocks, managing data and files across SAS and R, and rendering outputs within Quarto or R Markdown documents. It also provides functionalities for installing dependencies like Python's SASPy, configuring SAS, especially for SAS On Demand for Academics, and managing Quarto document templates for seamless integration with SAS output. Users can pass data between R and SAS, execute code blocks interactively, and render polished documents with familiar SAS styles.
Go to Resource
usethis
usethis is a workflow package that automates repetitive tasks that arise during project setup and development, both for R packages and non-package projects.
Go to Resource
Using {ellmer} for Dynamic Alt Text Generation in {shiny} Apps
This article describes how to use the {ellmer} package to automate the creation of alternative text (alt text) for images in {shiny} applications, with an emphasis on accessibility for screen readers. It addresses the challenges of generating dynamic alt text for interactive ggplot2 charts within {shiny} apps and introduces the reader to the package functions and error handling for robust application development. Practical examples with ggplot2 and the integration with large language models for descriptive text generation are also included, alongside tips for writing effective alt text.
Go to Resource
Using project scripts to keep Quarto source and output files organised
Pete Jones provides a tip for managing Quarto projects where the user wants to separate source (.qmd files) and output (.pdf, .html, etc.) files, especially when source files are in a subdirectory. The article addresses the problem that arises when Quarto's default settings place rendered output next to source files, which can create organizational issues in projects. The article intends to show how to overcome this by leveraging Quarto's features to keep files neatly organized within project subdirectories.
Go to Resource
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
Using Quarto to Write a Book
Kieran Healy discusses revising his Data Visualization book using Quarto, a publishing system optimized for plain-text format and integrates code snippets in documents. The book focuses on data visualization with R and ggplot, detailing advantages and constraints of Quarto. It maintains scholarly elements automatically, such as numbered figures and references, enhancing reproducibility. Healy emphasizes the benefits of plain-text and version control for accuracy and multi-format outputs (PDF, HTML), noting Quarto's implementation of literate programming and extensions of tools like pandoc, Sweave, and RMarkdown/knitr.
Go to Resource
Using renv in R
The content is a blog post by Erik Gahner Larsen discussing the use of the 'renv' package in R for managing package dependencies and ensuring reproducibility in R projects. It highlights issues faced when R scripts fail due to package updates or system changes and presents 'renv' as a solution for creating isolated project environments with specific package versions. This ensures that R scripts remain functional over time by snapshotting and restoring package states, thus allowing others to run the code with the intended results, even if the R landscape changes.
Go to Resource
Using the tidyverse with Databases
Using the tidyverse with Databases - Part I is a tutorial that provides an introduction to using databases in R with Tidyverse tools. The tutorial covers topics such as motivation, connecting to a database, using DBI and dplyr functions, executing queries with dbplyr, and more.
Go to Resource
Visualise, Optimise, Parameterise!
This content is a workshop summary for 'Visualise, Optimise, Parameterise!' focused on data visualization with penguins dataset. Participants learn to build, enhance, and make interactive graphs using R's ggplot2 and related packages. They start with a basic plot, improve it by adding colors and themes, and finally make it interactive. The workshop emphasizes optimising plotting functions and parameterisation to meet specific requirements. It includes a recorded demo, slides, code snippets, and resources which show steps to create custom themes and interactive plots using R, demonstrating with penguins' beak lengths data visualisation.
Go to Resource