Ryan McShane's Avatar

Ryan McShane

@ryanmcshane

Statistics professor at The University of Chicago * Researching intransitivity in paired comparisons, pedagogy in sports analytics courses. * Data viz enthusiast. * #RStats * #GSG πŸ€πŸ‡©πŸ‡ͺπŸ‡ΊπŸ‡Έ ryanmcshane.com

61
Followers
72
Following
44
Posts
18.09.2023
Joined
Posts Following

Latest posts by Ryan McShane @ryanmcshane

I use this every quarter I teach my course, "Practical R Programming;" thanks for the refresh @emilhvitfeldt.bsky.social !

30.01.2026 21:20 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
My cat Pam sitting on my shoulders while I cut a bell pepper. She demanded "ups" while I was cooking.

My cat Pam sitting on my shoulders while I cut a bell pepper. She demanded "ups" while I was cooking.

Catatouille πŸ‘¨β€πŸ³

29.01.2026 15:44 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Ryan McShane, Ph.D.: Extracting Colors From an Image with k-means Clustering A short demo using The Simpsons' Couch Gag

Maybe blog post #8 or 9 could be you adding a toggle between yellowed and color-corrected? 🫨

I wrote up a post a few years ago on how to extract colors from an image with k-means clustering (might be helpful)

blog.ryanmcshane.com/posts/2022-1...

29.01.2026 04:21 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Libby's app output (linked in her post)

Libby's app output (linked in her post)

Original artwork by Ellsworth from 1951 after which Libby modeled her app β€” collage on paper. "Spectrum Colors Arranged by Chance IV"

Original artwork by Ellsworth from 1951 after which Libby modeled her app β€” collage on paper. "Spectrum Colors Arranged by Chance IV"

Oh I thought I recognized this as soon as I saw the app output! This is at the Art Institute! I go there many Thursdays to work in the member's lounge.

29.01.2026 03:11 πŸ‘ 5 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

πŸ˜… I wouldn't have asked if I didn't think you could come back with the goods

29.01.2026 02:36 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

1. Image or it didn't happen!

2. Did you do it programmatically, or manually?

28.01.2026 23:59 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Don't forgot Tom Hanks got covid on the same day:

doi.org/10.1016/j.so...

24.01.2026 21:32 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Self-answer to the latter question: mostly no, sometimes yes according to a quick Google images search.

22.01.2026 23:04 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Did you generate random lines, then within regions randomly allocate one of five Bauhaus colors?

I've seen a few Bauhaus works in the US/UK/EU. I don't recall whether any of them had adjacent regions with the same colors (?). Not that such rules need to be followed!

22.01.2026 22:57 πŸ‘ 3 πŸ” 0 πŸ’¬ 3 πŸ“Œ 0

`^` >> `**`

06.11.2025 13:16 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
3Β  Base R Fundamentals – STAT2/37815: Practical R Programming

R accepts exponentiation like a**b (equivalent to a^b), possibly to be nice to SAS users? I think a**b is pretty common.

stat-37815-au24.ryanmcshane.com/l03-baserfun...

06.11.2025 01:28 πŸ‘ 0 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

I love this hex sticker!

(Also glad for this group and @ivelasq3.bsky.social 's scrollytelling!)

03.11.2025 18:15 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
David Lynch (RIP) meme variation where in a conversation with fellow filmmaker Jason Barlow, David Lynch said, "Python feels like soldering; R feels like painting." When Barlow asks him to "Elaborate on that," Lynch smiles and says, "No."

David Lynch (RIP) meme variation where in a conversation with fellow filmmaker Jason Barlow, David Lynch said, "Python feels like soldering; R feels like painting." When Barlow asks him to "Elaborate on that," Lynch smiles and says, "No."

Possibly weirded out my long-suffering colleagues with this idiosyncratic observation last week, and feel like it belongs in a meme.

#RStats #Python #RIPDavidLynch

24.10.2025 12:07 πŸ‘ 120 πŸ” 33 πŸ’¬ 5 πŸ“Œ 3
Preview
Reformating R cell in VSCODE with air does not correctly close chunk Β· Issue #745 Β· quarto-dev/quarto Originally posted at posit-dev/air#374 (comment) But it seems Quarto: Format Cell is a feature from Quarto extension. Not sure where to post this finding, if this is Quarto VSCODE extension that in...

Cool! Can't wait!

FWIW, I think I ran into the same issue Davis ran into in the issue you linked:

github.com/quarto-dev/q...

16.10.2025 16:54 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I would share for testing but all of my source repos are on private! ~~Github Copilot~~

Is the goal to run this before using Air on QMDs?

16.10.2025 15:25 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
`geom_boxplot` Whiskers never appear when IQR = 0 (`upper - lower = 0`) Β· Issue #5511 Β· tidyverse/ggplot2 I found a problem with ... geom_boxplot I expected ... Whiskers to appear. There's no convenient way to get whiskers to appear when IQR = 0 (upper - lower = 0) (that I am aware of*). Setting coef =...

Nabbed it! (Thanks; also enjoyed the read)

I actually prefer the range bar to the box plot and have been scheming to write an M.E. Spear {ggplot2} extension since this exchange (I just haven't had the time), which probably benefited from your linked 2016 blog post:

github.com/tidyverse/gg...

12.10.2025 23:12 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Ahhh! I've been looking for something like this for my blog!

(Wait... it's in Distill... is Distill still .Rmd-only?)

11.10.2025 13:32 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Yeah, I got a swag bag from #PositConf2025 and the Posit-branded S-Gel pen is in heavy rotation at the moment. I have dozens of other S-Gel pens, but this one has a special place in my heart. Will disassemble others for a refill.

I still use a MIT Sloan Sports Analytics Conf water bottle from 2017!

05.10.2025 18:51 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

I wrote a wrapper around {knitr} kable and {kableExtra} kable_styling that I put at the top of every HW assignment I give to students (output is always PDF). I also have it in all of my Beamer slides 😬

It makes kable tables nice by default.

You can still call, e.g. knitr::kable, too!

24.09.2025 21:06 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

abba, abc, xyz, xx, yy, and temp are my most commonly used placeholders/temporary names

Are there even rules against this, though?
"Thou shalt not have draft code!"?

24.09.2025 17:56 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I came here to make this comment. Beat me to it!

= forever

24.09.2025 17:37 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

CHI - United Center is ~2 mi away
MIL - 1.5 hr drive
MIN - staying in IA with s/o's bro (7hr drive)
DEN - staying in CO with s/o's other bro (flight)
CLE - 5.5 hr drive (hotel req)
IND - 3 hr drive

(All on days that work nicely with academic calendar)

21.09.2025 01:01 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

It's rough being away from home and a Spurs fan! NBA Team Pass has been helpful for the past decade, and I've been catching road games for the past couple of years, too! (This season: CHI, MIL, MIN, DEN, CLE, IND) #gsg

20.09.2025 23:11 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Laptop cover featuring 15 hex stickers and three Spurs basketball stickers

Laptop cover featuring 15 hex stickers and three Spurs basketball stickers

I might need to do this to keep up with my collection.

I have space for maybe two more, but I could fit even more if I moved some around; I'm scared to death of doing that!

I know I've seen guides around the internet on how to convert these hex stickers to magnets, but I've lost track of them πŸ™ˆ

20.09.2025 18:56 πŸ‘ 1 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0
The backside of the coin from another post that features the front side of the tidydevday 2025 coin.

The backside of the coin from another post that features the front side of the tidydevday 2025 coin.

Did my neighbor and I immediately check to see if our coins stuck together like magnets? Yes.

But also, the backside is a relief rendering of the {tidyverse} hex logo, so it feels trying to put a magnet on would undo one of the sides πŸ™ƒπŸ« 

20.09.2025 18:41 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Base R pipe AND lambda notation. Fixes #381 by math-mcshane Β· Pull Request #384 Β· tidyverse/forcats Searched all *.R and .Rmd files for examples using magrittr pipe, %>%. No examples needed, e.g., y |> (\(x) f(a = x, b = x))() nor y |> f(second_arg = _) etc. Finally, issue mentions tha...

The first PR in {forcats}

github.com/tidyverse/forcats/pull/384

20.09.2025 16:10 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Deprecate `use_pipe()`. Fixes #2124 by math-mcshane Β· Pull Request #2183 Β· r-lib/usethis Completed: Added a short deprecation message when using use_pipe(), Added a longer bit of advice in the package documentation for common substitutions, including the 2023 blog post on the base pip...

I also fixed the 2nd PR this morning.

Both of my PRs were about transitioning from the {magrittr} pipe to the Base R pipe β€” one to clean up {forcats} examples/vignette, and one to deprecate a {usethis} function that makes it easy to add %>% to a package.

github.com/r-lib/usethis/pull/2183

20.09.2025 16:09 πŸ‘ 0 πŸ” 0 πŸ’¬ 3 πŸ“Œ 0
Three tidyverse/r-lib stickers and a commemorative coin for participating in tidy dev day 2025

Three tidyverse/r-lib stickers and a commemorative coin for participating in tidy dev day 2025

A couple and the coin!

20.09.2025 16:03 πŸ‘ 0 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0
Hadley Wickham, me, and all of the post-it notes of completed PRs.

Hadley Wickham, me, and all of the post-it notes of completed PRs.

Just finished my first #rstats #TidyDevDay! It might have been a net negative on open issues, because I:

* opened an issue each in {pak}, {roxygen2}, and {gitcreds}
* submitted a PR to {forcats}
* submitted a PR to {usethis} (needs corrected test)

But at least I got this selfie with @hadley.nz πŸ« πŸ˜†

19.09.2025 22:30 πŸ‘ 23 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

In the "super rare" section at the bottom next to flair!

19.09.2025 02:18 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0