Articles by Higher Order Functions

Notes on Citing R and R Packages

May 2, 2024 | Higher Order Functions

Our group has started using a new knowledge base system, so I have been writing up and revisiting some of my documentation. Here I am going to share a guide I wrote about citing R packages in academic writing. Which software to cite Let’s make a dist... [Read more...]

How to score Rock Paper Scissors

December 6, 2022 | Higher Order Functions

Ho ho ho, it is the most wonderful time of the year: Advent of code! AOC is a yearly collection of programming puzzles throughout the first 25 days of December. I like it… so much so that I wrote an R package for completing my puzzles using the struct...
[Read more...]

Keep your R scripts locally sourced

August 15, 2021 | Higher Order Functions

A few weeks ago, I had a bad debugging session. The code was just not doing what I expected, and I went down a lot of deadends trying to fix or simplify things. I could not get the problem to happen in a reproducible example (reprex) or interactively (in RStudio). ...
[Read more...]

Think of `&&` as a stricter `&`

June 30, 2021 | Higher Order Functions

In programming languages, we find logical operators for and and or. In fact, Python uses the actual words and and or for these operators. # Python via the reticulate package x = True y = False x and y #__ False x or y #__ True In Javascript, we ... [Read more...]

Bayes’ theorem in three panels

March 4, 2020 | Higher Order Functions

In my last post, I walked through an intuition-building visualization I created to describe mixed-effects models for a nonspecialist audience. For that presentation, I also created an analogous visualization to introduce Bayes’ Theorem, so here I will walk through that figure.. As in the earlier post, let’s start by ...
[Read more...]

Another mixed effects model visualization

November 25, 2019 | Higher Order Functions

Last week, I presented an analysis on the longitudinal development of intelligibility in children with cerebral palsy—that is, how well do strangers understand these children’s speech from 2 to 8 years old. My analysis used a Bayesian nonlinear mixed effects Beta regression model. If some models are livestock and some ...
[Read more...]

ICC Bot comes online

September 17, 2019 | Higher Order Functions

I am happy to announce the release of ICC Bot, an app for computing interrater reliability scores using the intraclass correlation coefficient (ICC). A screenshot of ICC Bot, an interactive app for computing intraclass correlation coefficients. The ICC statistic appears in repeated measures or multilevel modeling literature as a way ...
[Read more...]

Anatomy of a logistic growth curve

February 15, 2019 | Higher Order Functions

In this post, I walk through the code I used to make a nice diagram illustrating the parameters in a logistic growth curve. I made this figure for a conference submission. I had a tight word limit (600 words) and a complicated statistical method (Bayesian nonlinear mixed effects beta regression), so ...
[Read more...]

10 PRINT mazes with ggplot2

May 8, 2018 | Higher Order Functions

There is a celebrated Commodore 64 program that randomly prints outs / and \ characters and fills the screen with neat-looking maze designs. It is just one line of code, but there is a whole book written about it.
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
Screenshots of the 10 PRINT program in action. Images taken from the 10 PRINT book. ...
[Read more...]
1 2

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)