#RCLIAdvent2026 Day 5: environment variables #rstats
Many CLIs read config from env vars. FreeSurfer needs FREESURFER_HOME and SUBJECTS_DIR, which users normally set by sourcing FreeSurfer's setup script in their shell.

#RCLIAdvent2026 Day 5: environment variables #rstats
Many CLIs read config from env vars. FreeSurfer needs FREESURFER_HOME and SUBJECTS_DIR, which users normally set by sourcing FreeSurfer's setup script in their shell.
#RCLIAdvent2026 Day 4: finding the executable #rstats
The most common bug report for a wrapper package: "it works in the terminal but not in RStudio."
#RCLIAdvent2026 Day 3: processx::run() #rstats
Yesterday's system() and system2() fail silently. processx::run() doesn't.
Honest admission: I don't use it in my own wrappers yet. Researching this calendar sold me on it.
res <- processx::run("pandoc", "--version")
#RCLIAdvent2026 Day 2: system() vs system2() #rstats
Base R has two functions for running external commands, and they share one trap.
Welcome to #RCLIAdvent2026 🎄 #rstats
For 25 days I'll post one technique a day for wrapping command-line tools in R, from the first system2() call all the way to CRAN.
Day 1: why wrap a CLI at all?
Tomorrow I open the first door of #RCLIAdvent2026 🎄 #rstats
25 days of wrapping command-line tools from R: one small technique a day, from your first system2() call all the way to a package that's ready for CRAN.