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.

Chat with Large Language Models • {ellmer}

The 'ellmer' package facilitates the use of large language models (LLMs) directly from R. It provides access to multiple LLM providers and features like streaming outputs and structured data extraction. 'ellmer' supports models such as Anthropic's Claude, AWS Bedrock, and OpenAI's GPT, among others. The package offers interactive and programmatic ways to converse with models, maintaining the conversation state, which is useful for building on previous interactions. 'ellmer' is practical for both organizational and personal use, accommodating various IT restrictions and preferences.

Go to Resource

Easily download files from the Open Science Framework with Papercheck

The 20% Statistician is a blog focusing on statistics, research methods, and open science. It aims to help researchers understand crucial statistical concepts, claiming that grasping 20% of statistics can improve 80% of inferences. A recent post highlights the challenge of downloading files from the Open Science Framework (OSF). The authors, DeBruine and Lakens, introduced 'Papercheck,' an R package with a function 'osf_file_download' that simplifies this process. Papercheck recreates OSF's folder structure within a local directory, making it user-friendly to access project files for review or reuse.

Go to Resource

Exploring {ggplot2}’s Geoms and Stats

This content delves into the intricacies of geoms and stats within the {ggplot2} package's Layered Grammar of Graphics. It emphasizes the way plots are constructed by adding layers, each comprising a geom and a stat. A geom dictates the visual representation, while a stat preprocesses the data. The article explains how, for instance, geom_histogram() applies a binning stat. The exploration includes R code for listing and correlating the geoms and stats in {ggplot2}, and generating a plot to visualize the combinations. Additionally, it demonstrates data extraction post-transformation.

Go to Resource

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

Generating quarto syntax within R – Notes from a data witch

This blog post introduces 'quartose', an R package designed to integrate with Quarto for literate programming. The author, located in Sydney, discusses the nuances of names and their personal connection to this topic before exploring a data analysis task using the 'babynames' package. The analysis involves mapping names to data frames and visualizing name popularity over time. The post concludes with a demonstration of 'quarto_tabset()' that allows inserting plots or data frames into a document as a tabbed interface, enhancing the presentation of data in a readable and interactive format.

Go to Resource
Screenshot of How (and Why) I came to Use R for Data Analysis and Evaluation

How (and Why) I came to Use R for Data Analysis and Evaluation

Alberto Espinoza recounts his journey with R for data analysis and evaluation, marking his 10-year experience since first encountering R during his graduate assistantship. Initially clueless about R, he was tasked with assisting and leading statistics labs using R. Despite early challenges and a steep learning curve, he recognized R's power over software like SPSS or Excel. His continued use of R spanned graduate projects, market research, data preparation for Tableau, and Survey Monkey analysis. Espinoza outlines R's advantages: reproducibility, efficiency, clarity, and an extensive package ecosystem, underlining R's significance in his professional growth.

Go to Resource
Screenshot of How to Get Good with R? | Credibly Curious

How to Get Good with R? | Credibly Curious

This blog post discusses tips and strategies for improving coding skills in R, as well as non-coding aspects like community involvement and continuous learning.

Go to Resource
Screenshot of How to Make Functions in R

How to Make Functions in R

This article provides a tutorial on how to make functions in R, with a focus on creating user-defined functions. It discusses the benefits of using functions and provides an example of creating a function to generate a table of the largest schools in different states using a dataset on school enrollment. The article also mentions the author's custom training services for organizations looking to transition to R and improve their programming efficiency.

Go to Resource
Screenshot of How to make your own #RStats Wrapped! | Nicola Rennie

How to make your own #RStats Wrapped! | Nicola Rennie

This blog post provides a tutorial on how to create your own #RStats Wrapped, showing your most used functions and creating a graphic with ggplot2.

Go to Resource

How to open a folder as a Positron project with macOS Quick Actions

Andrew Heiss provides a macOS Quick Action workflow for opening folders as projects in Positron directly from Finder. He details the challenges of transitioning from RStudio's Rproj files to Positron, which lacks an equivalent. To improve efficiency, Heiss introduces an 'Open in Positron' Quick Action and explains the concept of Positron workspaces. He compares them to Rproj files and discusses their pros and cons, offering insights into project-oriented workflows for Positron. Additional details include the integration of project switcher menus, recent project lists, and multi-root workspaces in Positron.

Go to Resource
Screenshot of I Made R Text For Me

I Made R Text For Me

Brenden Smith shares his experience tackling procrastination in his personal life by using R to automate monthly utility bill calculations and notifications for his roommates. He created an R script connected to a Google Sheets spreadsheet to automatically handle and split the bills, and even set up cron jobs to ensure the process runs without his intervention. His project shows how programming can be applied to simplify and optimize mundane tasks, turning them into efficient, automated systems.

Go to Resource

LibreTranslate API for R: translate, detect languages

libretranslateR is an R package that provides a binding to the LibreTranslate API, enabling users to perform translation tasks, detect languages, and list available languages for translation, all from within R. The package includes a user-friendly wizard for configuration, and allows connections to any LibreTranslate instance, offering flexibility and offline translation capabilities by hosting your own instance. Currently not available on CRAN, it can be installed directly from GitHub via the 'remotes' package, and comes with features like auto-detection of languages, translation without leaving R, and future enhancements like file translation and more user-friendly language names.

Go to Resource