woodpeckR: coding, one acorn at a time

A Semi-Automated Process for Converting Slides to a Blog Post in RMarkdown

Recently, I adapted slides from one of my talks into a blog post format, with each slide's narration transcribed below it. In my experience, people don't usually post slides this way, and the process of converting a presentation to a blog post wasn't trivial. Here's the process I followed--I hope it helps anyone else who would like to do this too.

greenT part 2: Behind the app

A more detailed explanation of some of the code that makes the greenT app work.

greenT: Exploring grapheme-color synesthesia

An introduction to a Shiny app I built to show friends the inner workings of my brain--and some musings on my experience learning Shiny this year.

%$%: upping your pipe game

I love the magrittr/dplyr pipe: %>%. But it's meant to work with tidyverse functions, and it doesn't always work well with base R functions that take a single data frame column as input. Here, I use data about my friends' pets to explain how a different magrittr pipe, %$%, solves that problem.

Some lessons from rstudio::conf 2020

Some of my thoughts about R and the R community after attending the 2020 rstudio::conf in San Francisco.

If ifelse() had more if's (case_when(), part 2)

In which I learn how to make case_when() behave like a true if/else, including the else part. What happens when you only want to assign particular outcomes to a few cases, without touching the rest? Or if you want to bulk-assign all the unspecified cases to one outcome? The syntax is weird, but it works.

Loading packages efficiently

A trick I sometimes use to load a whole bunch of packages for every script in a project, while saving myself some typing. (Preview image from https://towardsdatascience.com/a-comprehensive-list-of-handy-r-packages-e85dad294b3d)

If ifelse() had more if's

In which I discover dplyr's case_when() function, a vectorized version of ifelse().

Initializing an empty list

When you're using a for loop to fill up a list, sometimes it's a good idea to initialize the list ahead of time, with the right number of elements but with no data. But actually doing this is a little harder than I had anticipated.

(Automatically show output)

A neat trick with parentheses to print the contents of an object you just created, without running another line of code.


Making a frequency table with proportions instead of counts. Preview image from https://twitter.com/lyric_rep/status/1010594530435846144.


A brief introduction to the with() function

Changing individual column names

How to rename individual columns in a data frame, based on the previous names and without using previous names.

The %notin% operator

Why is negating `%in%` such a pain?

Where are my NA's?

I wrote a function to summarize how many `NA`'s are in each column of a data frame. Preview image by Allison Horst, https://github.com/allisonhorst.

More articles »

woodpeckR: coding, one acorn at a time


If you see mistakes or want to suggest changes, please create an issue on the source repository.