waldo finds and describes differences between pairs of R objects, primarily designed to help debug failing unit tests. The compare() function works like all.equal() but provides more actionable output for troubleshooting.
The package prioritizes differences from most to least important, displays only the values that actually differ in atomic vectors, and uses color to highlight changes. It shows differences using executable R code paths rather than text descriptions, compares named elements by name instead of position, and includes context around changes in long vectors. The output adapts to console width with three display modes for optimal readability.
Contributors#
Resources featuring waldo#
Posit Meetup | Jake Riley, Children’s Hospital of Philadelphia | Translating Facts to Insights
RStudio Healthcare Meetup:
Translating facts into insights at Children’s Hospital of Philadelphia Led by Jake Riley, data analyst at The Children’s Hospital of Philadelphia
Abstract: {headliner} is a new R package to add dynamic, insightful text to plots and reports. {headliner} generates useful talking points that users can string together using {glue} syntax. This makes it easy to write an informative sentences without adding a lot of technical debt to a project. Learn how to get started with {headliner} and ways we have used it at The Children’s Hospital of Philadelphia.
Speaker Bio: Jake Riley is a data analyst at The Children’s Hospital of Philadelphia. He is the author of several R packages related to data visualization and automated exploratory analysis. You can find his published work [simplecolors] and [shinyobjects] on CRAN with more packages on the way.
Timestamps: 0:49 - Start of talk 1:25 - Dashboards focused on facts vs. insights 2:56 - What’s a good title for a chart? 5:09 - Intro to headliner package 7:41- using glue() under the hood 14:04 - helpers for working with data frames: compare_conditions() 18:41 - using ggtext 21:27 - example using pixar_films 23:40 - how they’ve used it at CHOP 28:05 - Next steps for headliner package 29:32 - Start of Q&A session
Questions: 29:32 - Can you use any package you want in your organization? 31:13 - How do you load previous datasets to compare to current datasets? 32:48 - When you mentioned a front page on RStudio Connect (with the headlines), what is that? 33:25 - Is anyone using this for manuscripts at CHOP now? 36:24 - What has the adoption of R or Python been within the hospital analytics team? 37:28 - My manager is very leery of R because of technical depth. Any suggestions for convincing her of R’s value? 42:22 - How does CHOP use R for non-clinical analysis? 43:36 - How do you train new people to use R? 46:28 - How do you compare last week’s analysis to this week’s? 49:37 - Were there any major challenges in creating the hospital’s internal package?
Resources/links shared: Jake’s LinkedIn: https://www.linkedin.com/in/jake-riley-70736a3/ headliner package: https://github.com/rjake/headliner waldo package: https://www.tidyverse.org/blog/2020/10/waldo/ Examples of R in Life Science & Healthcare: https://www.rstudio.com/champion/life-science Chris Bumgardner’s talk on building an R-based analytic practice at Children’s Wisconsin: https://youtu.be/pHZ8dsc0PhY simplecolors package to generate hex codes using uniformly named colors: https://rjake.github.io/simplecolors/ R Packages book by Hadley Wickham & Jenny Bryan: https://r-pkgs.org/
Meetup Links: Future events: rstd.io/community-events-calendar If anyone’s interested in speaking at a future meetup, we’d love to hear from you too! rstd.io/meetup-speaker-form


Hadley Wickham | testthat 3.0.0 | RStudio (2020)
In this webinar, I’ll introduce some of the major changes coming in testthat 3.0.0. The biggest new idea in testthat 3.0.0 is the idea of an edition. You must deliberately choose to use the 3rd edition, which allows us to make breaking changes without breaking old packages. testthat 3e deprecates a number of older functions that we no longer believe are a good idea, and tweaks the behaviour of expect_equal() and expect_identical() to give considerably more informative output (using the new waldo package).
testthat 3e also introduces the idea of snapshot tests which record expected value in external files, rather than in code. This makes them particularly well suited to testing user output and complex objects. I’ll show off the main advantages of snapshot testing, and why it’s better than our previous approaches of verify_output() and expect_known_output().
Finally, I’ll go over a bunch of smaller quality-of-life improvements, including tweaks to test reporting and improvements to expect_error(), expect_warning() and expect_message().
Webinar materials: https://rstudio.com/resources/webinars/testthat-3/
About Hadley: Hadley Wickham is the Chief Scientist at RStudio, a member of the R Foundation, and Adjunct Professor at Stanford University and the University of Auckland. He builds tools (both computational and cognitive) to make data science easier, faster, and more fun. You may be familiar with his packages for data science (the tidyverse: including ggplot2, dplyr, tidyr, purrr, and readr) and principled software development (roxygen2, testthat, devtools, pkgdown). Much of the material for the course is drawn from two of his existing books, Advanced R and R Packages, but the course also includes a lot of new material that will eventually become a book called “Tidy tools”
