Malcolm 朝精 Barrett
banner
malcolmbarrett.malco.io
Malcolm 朝精 Barrett
@malcolmbarrett.malco.io

Ph.D., epidemiology. research software engineer @ Stanford Health Policy. living in Ann Arbor. open-source data science. causal inference. doing poems on aircrafts. approximately Bayesian. formerly Posit, Apple, AmeriCorps. 心を燃やせ。sic semper tyrannis. .. more

Art 37%
Education 11%
Pinned
Link broke! Here is the current link: www.r-causal.org/chapters/04-...

At least in Rmd/qmd, if you see output you have a sense it was run in a certain order. With Jupyter notebook output not even god knows the execution order

If they can run line 50 before line 1 then we can have whiskey before 5

You're underestimating just how little of a link there is between the order the code is written and the order the code was run interactively.

Reposted by Barrett

You can now convert your Notion pages and databases to durable, private, local files.

Your data, offline, forever, for free.

Reposted by Barrett

#rstats Some packages include many datasets to illustrate the methods they provide, like my {heplots} and
{vcdExtra} pkgs.
I devised a scheme, using `@concept` tags to classify them according to the methods.
Perhaps this is useful to others

I describe what I did in this vignette: bit.ly/4oalgBd
Data sets in the heplots package
friendly.github.io

the fact that they also need breakfast every day is just salt in the wound

Reposted by Barrett

#rstats Please welcome Jarl, a new R linter.

Jarl is a CLI tool with extensions in VS Code, Positron, and Zed. It can check thousands of lines of R code in milliseconds.

Jarl provides several output formats, a Github Actions workflow, and more.

Blog post: www.etiennebacher.com/posts/2025-1...

Reposted by Barrett

ever since i was a little boy i always knew i wanted to be 38 years old writing short sentences on a website

Reposted by Barrett

You’re a timerfluencer, Libby
I'm reminded of how handy the usethis::browse_*() functions are and thought I'd remind people they exist. Choose from a menu of links or go straight to CRAN or GitHub. #rstats

Reposted by Barrett

#rstats
🌈🌈 Do you ever need/want to print text in color in markdown/Quarto documents, so you can easily refer to red points or blue lines in a graph?
A start on this is in the {colorize} 📦, friendly.github.io/colorize/
Render Text in Color for Markdown/Quarto Documents
The colorize package provides some simple functions for printing text in color in markdown or Quarto documents, to be rendered as HTML or LaTeX. This is useful when writing about the use of colors in ...
friendly.github.io
YOU GUYS WANNA SEE SOMETHING CURSED???? HOW ABOUT NEON GENESIS LEHIGH VALLEY PHANTOMS HOCKEY?????

It's going to take America a generation to recover from what RFK has done to the skinny tie

Reposted by Barrett

Continuing my #python Rgonomics posts for the #rstats crowd, wrote a short post about the different ways to use (non-polars) user-defined functions in a pipe

Not the most groundbreaking thing, but one of those "the thing I needed to read a bit ago" posts

(1/)

www.emilyriederer.com/post/py-rgo-...
Welcome! | Emily Riederer
www.emilyriederer.com

Reposted by Barrett

I made an ascii art moon phase tracker that runs whenever I open a new terminal window, and it makes me aware of the passage of time more than any calendar. github.com/asweigart/as... and github.com/asweigart/as...

Reposted by Barrett

Reposted by Barrett

library(ggplot2)
library(mgcv)
ggplot(mtcars) +
aes(x = hp, y = disp) +
geom_point() +
stat_smooth(
aes(color = "vanilla gam"),
method = "gam"
) +
stat_smooth(
aes(color = "monotonic constraint"),
method = mgcv::scasm,
formula = y ~ s(x, bs = "sc", xt = c("m+"))
)

Reposted by Barrett

We're hiring an open-source #python developer focused on modeling APIs!

tidyverse.org/blog/2025/11...

#numpy #scipy #scikitlearn
Python Open-Source Developer
Posit is hiring a Python open-source developer to create more data analysis tools.
tidyverse.org
A new release of the mgcv #RStats 📦 is out on CRAN and Simon Wood (U Edinburgh) has added some significant new features despite the small bump in version number:

🌟 scasm() for estimating GAMs with shape constrained smooths. Can be used with any family & smoothness selection is via the EFS method
The recording of my #rstats posit::conf talk ✨ practical {renv}✨ is available! 🎉

I created this talk for frustrated {renv} users 🫠 and potential {renv} users🤩

youtu.be/l01u7Ue9pIQ?...

Even if {renv} isn't on your radar, you may still find this talk interesting if you are curious about🤔...
Practical {renv} (Shannon Pileggi, The PCCTC) | posit::conf(2025)
YouTube video by Posit PBC
youtu.be

Reposted by Barrett

Found this on LinkedIn but truer words never spoken. Stop the Python project "dependency hell" and make the switch to Python's {uv} framework. Here's a great YouTube video that really resonated with me being an R first dev... From Posit's Julia Silge: youtu.be/pMVYl9fx1EE

I’m pretty sure that’s what is happening for me too so will try! Thanks!!

Reposted by Barrett

You can even send a free fax to your Senators to tell them to HOLD THE LINE.
Fax Senators
FaxZero lets you send free faxes to your senators with no subscription or sign-up.
faxzero.com
My talk from posit::conf earlier this fall on getting unstuck with #Python is now available to watch!

- Ten years ago, I attempted to learn Python and it went EXTRMELY badly 😩
- I am really happy that so much tooling in this area has improved SO much since then 😌

youtu.be/pMVYl9fx1EE
How I got unstuck with Python (Julia Silge, Posit) | posit::conf(2025)
YouTube video by Posit PBC
youtu.be

Reposted by Barrett

Dr. Cat Hicks (@grimalkina.bsky.social) gave one of my very favorite keynotes of all time at #positconf this year 🥹 It really made my heart glow, and now that all the conf talks are on YouTube, you can watch it even if you missed conf!! #databs #rstats #python

www.youtube.com/watch?v=B-bM...
The Psychology of Technologists (Cat Hicks, Catharsis Consulting) | posit::conf(2025)
YouTube video by Posit PBC
www.youtube.com

this is the most amazing idea I've ever seen

I want to click to there

I don't know what to make of that either. do you make lukewarm water by adding ice to boiled water????

I don't know what to make of this