focusonr
  • Home
  • rgtlab.org
Categories
All (63)
academic-publishing (1)
ai (1)
ai-assisted-development (2)
ai-assisted-writing (3)
ai-policy (1)
audit (1)
aws (3)
backup (4)
blogging (1)
borg (1)
caddy (1)
checklist (2)
ci (2)
claude (1)
cli (1)
clinical-trials (2)
cloud (1)
code-review (2)
cross-validation (1)
data-cleaning (1)
data-management (1)
data-visualization (4)
deployment (2)
dictation (1)
docker (6)
dotfiles (2)
dropbox (1)
editing (3)
encryption (1)
ffmpeg (1)
git (5)
github-actions (2)
gpg (2)
higher-education (1)
home-server (1)
javascript (2)
julia (1)
linux (7)
llm (1)
lua (1)
machine-learning (2)
macos (7)
metaprogramming (2)
migration (1)
model-selection (2)
neovim (2)
netlify (1)
obs (1)
onboarding (1)
open-education (1)
package-development (1)
packaging (1)
pedagogy (1)
penguins-arc (3)
phb228 (1)
podman (1)
publishing (3)
python (3)
quarto (8)
r (30)
r-language (2)
r-package (1)
r-packages (4)
random-forest (2)
rclone (1)
regression (4)
renv (1)
reproducibility (22)
research-integrity (1)
research-papers (1)
rmarkdown (3)
samba (1)
screencast (1)
secrets (1)
security (8)
setup (8)
shell (8)
shell-and-git (1)
shiny (6)
simulation (1)
statistical-computing (1)
storage (2)
sync (1)
tailscale (1)
teaching (4)
testing (3)
testthat (1)
textbooks (2)
threat-model (1)
tinytest (1)
tooling (1)
unix (2)
video-production (1)
vim (4)
whisper (2)
workflow (10)
workflow-construct (6)
writing (3)
youtube (1)
zsh (1)
zzcollab (1)
zzcollab-compendia (11)
zzvim-r (1)

focusonr

Technical articles and explorations in statistical computing, data science, and R

Technical articles and explorations in statistical computing, data science, and R programming, written from the working notes of a lab that runs on both.

Offloading R Simulations to a Home Server

zzcollab-compendia
simulation
reproducibility
podman
home-server

A long simulation should not depend on a laptop staying awake. This post describes a small, reproducible way to send an R simulation from a workstation to an always-on home server: the job runs in the project’s own container image, from an exact commit, under resource limits, and comes back with a provenance record and a push notification at the end. It also covers running a second, faster host, and letting other machines submit jobs through restricted keys.

Oct 4, 2026
27 min

Running the Quarterly Security Audit for the First Time: What Actually Broke

security
backup
audit
macos
linux

The first full quarterly audit of a five-machine research fleet, and the week that followed. Every control in the threat model held; the failures lived elsewhere: credentials with the wrong coverage, OAuth grants shared across machines, backups that reported success while covering less than intended, and fixes verified on one machine but not the others.

Sep 27, 2026
23 min

A Home Server for a Five-Machine Research Fleet

security
linux
storage
backup
tailscale
samba

How a repurposed 2016 MacBook Pro running Linux Mint serves a five-machine research fleet as its Borg repository host, its Time Machine share, and its remote of last resort for code that cannot go to GitHub. Covers the hardware realities of a laptop server, stable addressing over Tailscale, a default-deny firewall, an ext4 SSD with TRIM over USB, and the Samba details that kept the share unreachable until they were fixed.

Sep 11, 2026
21 min

Object Storage for Research Data: The Layer Git Cannot Hold

security
storage
reproducibility
data-management
zzcollab

Code goes to git, but where does research data go? This post argues for a versioned object store addressed by content hash, gives a tested manifest-and-fetch pattern that turns a laptop into a cache rather than a replica, shows how it completes the data pillar of a zzcollab compendium with a hash-linked provenance chain from a rendered report back to the exact bytes, and walks through a SeaweedFS setup that enforces write-once. Nothing here is deployed yet; the post says what would justify deploying it.

Sep 11, 2026
40 min

What Makes an Open Textbook Work: A Guidebook for New Authors

teaching
open-education
textbooks
publishing
pedagogy

Open licensing reliably buys access and retention, and it buys no pedagogy at all. A survey of the efficacy studies, 954 reviewer assessments, and author retrospectives, assembled as practical guidance for anyone starting a free textbook.

Sep 7, 2026
18 min

A Voice-Driven Copyedit Pipeline for Quarto Blogs and Research Papers

workflow
whisper
quarto
git
dictation
tooling

Building a voice dictation pipeline for copyediting 57 blog posts and 90 research papers taught me more about failure modes than about speech recognition. Design, real scripts, and a worked example run end to end for real, including every bug it took to get there.

Sep 1, 2026
38 min

Hosting a Shiny App in Production: Docker Compose, Caddy, and Automatic HTTPS

docker
shiny
caddy
deployment

Turning a running EC2 instance into a secure, continuously updated home for a Shiny app, using Docker Compose to wire together the application container, a Caddy reverse proxy with automatic HTTPS, and Watchtower for zero-touch redeploys.

Aug 28, 2026
18 min

Introducing zzvim-R

vim
neovim
r
r-packages

A 150-line proof of concept for sending R code from a Vim buffer to a terminal grew, over a year, into a publicly released plugin with context-aware submission, inline plots, and a Docker-aware workspace HUD.

Aug 28, 2026
7 min

Review Methodology for AI-Assisted Research Paper Drafting

writing
research-papers
academic-publishing
ai-assisted-writing
research-integrity

A methodological framework for reviewing research manuscripts drafted with generative-AI assistance, structured as five review phases plus an explicit test for whether the human author has earned authorship of the result, grounded in published journal and publisher AI-disclosure policy.

Aug 21, 2026
26 min

A Review and Proposal for Policy Regarding Generative AI Use in Graduate Biostatistics Courses

teaching
ai-policy
statistical-computing
higher-education
phb228

A review of how peer graduate biostatistics and statistical computing courses handle generative AI, from outright bans to required use, followed by a policy proposal for PHB 228 at UCSD.

Aug 18, 2026
29 min

Review Methodology for AI-Assisted Blog Post Drafting

writing
blogging
ai-assisted-writing
editing
publishing

A methodological framework for reviewing blog posts drafted with generative-AI assistance, structured as five review phases plus an explicit test for whether the human author has earned ownership of the prose.

Aug 18, 2026
20 min

Review Methodology for AI-Assisted Textbook Drafting

writing
textbooks
teaching
ai-assisted-writing
editing

A methodological framework for reviewing textbook chapters drafted with generative-AI assistance, structured as five review phases plus an explicit test for whether the human author has earned ownership of the material.

Aug 18, 2026
22 min

Exemplar Code Review: The zzobj2fig Package

r
r-packages
code-review
ai-assisted-development
zzvim-r

An applied, step-by-step walkthrough of reviewing an AI-assisted R package with zzvim-R as the review environment, from structural audit through CRAN submission.

Aug 18, 2026
18 min

Code Review for AI-Assisted R Package Development

r
r-packages
code-review
ai-assisted-development
testing

A methodological framework for reviewing R packages built through human-AI collaboration, structured as five review phases plus an explicit test for whether the human author has earned ownership of the result.

Aug 18, 2026
59 min

Hosting a Quarto Book Series on Netlify with Route 53 and GitHub Actions

quarto
netlify
deployment
reproducibility

A reproducible recipe for serving a multi-volume Quarto book series under a custom domain, with one subdomain per book, automatic SSL, and continuous deployment on every push.

Jun 20, 2026
12 min

Getting Started in a Reproducible Biostatistics Lab: A Student Reading Guide

r
zzcollab-compendia
reproducibility
workflow
onboarding

A new student arrives with a small dataset, a laptop, and enthusiasm. This post maps the sequence of posts in this blog that will take them from a bare command line to a reviewed, published, reproducible analysis, organized as eight phases in roughly the order a professor would assign them.

Jun 11, 2026
30 min

zzcollab Analysis Profile Walkthrough: A 55-Item Step-by-Step Guide

r
zzcollab-compendia
reproducibility
workflow
checklist
docker
penguins-arc

A concrete, command-level walkthrough of building a reproducible analysis compendium with zzcollab’s analysis profile. Each of the 55 checklist items includes the exact shell commands, R code, and file templates needed to reach the stated deliverable. Uses the analysis profile (rocker/tidyverse) throughout.

Jun 10, 2026
26 min

Seven Required Elements for a zzc Manuscript report.Rmd

zzcollab-compendia
rmarkdown
reproducibility
workflow
publishing
zzcollab-compendia

Every zzcollab manuscript compendium needs seven specific YAML and structural elements in its report.Rmd to produce a correctly formatted, stamped, and staged PDF. Missing any one of them is easy to do and surprisingly hard to diagnose later.

May 25, 2026
21 min

GitHub Actions workflows for zzcollab research compendia

ci
github-actions
zzcollab-compendia
reproducibility
r-package

Not all zzcollab repos need the same CI. A manuscript-package compendium requires both an R CMD check workflow and a report-rendering workflow; a data-analysis compendium needs only the latter; a blog-post compendium needs neither. This post maps the three workspace types to their correct workflow combinations and walks through each YAML file line by line.

May 18, 2026
41 min

Provisioning AWS EC2 Instances: Console and CLI Methods

aws
shell
shiny
docker

Setting up an AWS EC2 instance from scratch, with two parallel paths: a console walkthrough for understanding the components, and four bash scripts for repeatable CLI automation.

May 17, 2026
20 min

Secrets Management for the Workflow Construct

setup
security
secrets
gpg
unix
cloud
aws

Where API keys, cloud credentials, and OAuth tokens may live on a multi-machine research fleet, how to load them on demand from pass, and the rotation discipline that a real credential exposure taught: a printed secret is an exposed secret, an old credential is live until a test says otherwise, and revoking an OAuth grant logs out every machine at once.

May 17, 2026
20 min

Security Foundations for a Multi-Machine Research Fleet

security
threat-model
encryption
backup
macos
linux

The hub of a security series for a five-machine research fleet: what we defend against, the controls that answer each threat, the quarterly audit that keeps the controls from decaying, and the reading path through the rest of the series.

May 17, 2026
22 min

Setting Up pass: a Unix Password Manager

security
unix
shell
gpg
setup

A password store that is a directory of GPG-encrypted files, tracked in git and synced through a private remote: how to set it up, use it on several machines, protect the key, and replace the key when it is exposed.

May 17, 2026
25 min

Research Backup Architecture: Borg, Cloud Copies, and Time Machine

security
backup
borg
rclone
macos
linux
reproducibility

How a five-machine research fleet implements 3-2-1 backup: nightly encrypted Borg archives to a home server through restricted append-only keys, per-machine cloud copies with rclone, and an encrypted Time Machine share. Covers retention, restore testing, monitoring, and the failures that only reading logs revealed.

May 17, 2026
25 min

Multi-Laptop macOS Bootstrap: Migrating Dotfiles to a Versioned Git Repository

dotfiles
shell
macos
setup
reproducibility
workflow-construct

My development environment was more fragile than it looked: setting up a second MacBook revealed that my entire shell configuration had no git history, no rollback, and no deployment mechanism.

May 17, 2026
26 min

Unix Command-Line Workspace Setup for Data Science Researchers

shell
macos
linux
dotfiles
git
workflow
setup

A new researcher arrives with two macOS laptops and a Linux Mint workstation. This post builds the terminal layer, the shell layer, and the dotfiles repository that keeps all three machines consistent from day one.

May 17, 2026
29 min

Sharing R Code via Docker: R Markdown Reports and Shiny Applications

r
docker
rmarkdown
shiny
reproducibility

Sharing R code is more fragile than it looks: my colleague spent an afternoon debugging missing packages, and Docker would have prevented every single error, whether the output was a static PDF or a live Shiny app.

May 17, 2026
24 min

Migrating Off Dropbox: Beyond Dotfiles

security
workflow
sync
migration
dropbox

Leaving a sync daemon is a classification problem before it is a copying problem. This post covers where each part of a research workflow went after Dropbox (configuration to a git repository, projects to local folders with backups, history files to per-machine state), the credential exposure that settings folders linked into the synced tree had caused, how to delete a shared copy without a forgotten device restoring it, and how the machines stay in step afterwards.

May 7, 2026
23 min

A tiered CI strategy for zzcollab research compendia

ci
github-actions
reproducibility
zzcollab-compendia
renv

My CI was lying to me: a single explicit failure check turned five ‘passing’ projects honestly red. A workflow-style migration guide for zzcollab projects across four workspace types.

May 6, 2026
31 min

Producing R Coding Videos: OBS Screencasts and Narrated Slide Decks

setup
obs
youtube
screencast
video-production
ffmpeg
whisper
r
reproducibility

A reproducible, hands-on pipeline for producing R data analysis videos two ways: live OBS Studio screencasts and edited, narrated slide decks assembled with sox, ffmpeg, and Whisper. Includes installation, a worked five-minute Palmer Penguins example for each method, and a full YouTube publishing walkthrough.

May 2, 2026
37 min

From testthat to tinytest: Converting an R Package Test Suite

r
testing
tinytest
testthat
packaging

testthat carries a surprising amount of ceremony: rewriting a small package’s suite in tinytest lost roughly two-thirds of the lines without losing any coverage.

May 2, 2026
54 min

Functional Plot Generation with purrr

r
data-visualization

Generating multiple plots from grouped data programmatically is a job for purrr’s map2 and pmap functions. This post walks through the approach step by step using Palmer Penguins.

May 1, 2026
13 min

Setting Up Multi-Language Quarto Documents on macOS

quarto
r
python
julia

A practical guide to the configuration plumbing required to render a multi-language Quarto document from scratch on macOS.

May 1, 2026
16 min

Rapid Conversion of Draft R Scripts to Formal Rmd Reports

r
rmarkdown
reproducibility

Converting a working R script into a presentable report quickly is a job for knitr::spin() and a few supporting workflows that changed how I share analytical results.

May 1, 2026
16 min

Install Linux Mint on a MacBook Air

linux
macos
r
python
workflow-construct

A practical guide to installing Linux Mint 22 on a 2016 MacBook Air, transforming aging Apple hardware into a functional data science workstation.

May 1, 2026
21 min

A 55-Item Initiation Checklist for zzcollab Data Analyses

r
zzcollab-compendia
reproducibility
workflow
checklist
quarto

A clinical research collaborator emails a single CSV file with twelve columns, two hundred and eighty-seven rows, no codebook, and a promise of an updated extract ‘next week’. We walk through the fifty-five items that move that attachment from the inbox to a reproducible zzcollab compendium ready for archival.

Apr 29, 2026
82 min

LLM-Augmented Editing for the Workflow Construct

setup
llm
ai
claude
editing
workflow
workflow-construct

An open-architecture pattern for LLM-augmented editing scoped to an applied biostatistician’s daily work. The post documents Claude Code at the shell as the primary integration, distinguishing it from in-buffer plugins, graphical AI editors, and browser-based prompting. The CLAUDE.md per-project convention is presented as the load-bearing artifact that makes the integration usable rather than novel.

Apr 28, 2026
33 min

Modern CLI Replacements for the Shell Layer

setup
shell
cli
workflow
workflow-construct

Eight Rust-implemented utilities (ripgrep, fd, bat, eza, zoxide, delta, lazygit, fzf) that compose into a Shell-layer extension of the Workflow Construct. The post documents the installation, configuration, daily-use substitutions, and failure modes for each, plus the autojump-to-zoxide migration that preserves the j muscle memory while upgrading the underlying frecency database.

Apr 27, 2026
30 min

A Workflow Construct for the Modern Data Scientist

setup
workflow
zsh
vim
docker
reproducibility
workflow-construct

A reproducible reference for the laptop-scale workflow construct used in day-to-day data science and biostatistics work. The post documents the existing layers (hardware, operating systems, file system, shell, editor, scripts, applications, cloud, backup, R packages) drawn from a working notebook outline, then proposes a set of evidence-graded extensions appropriate to a 2026 polyglot practice (LLM-augmented editing, modern CLI replacements, secret scanning, secure remote access, polyglot reproducibility, and knowledge management).

Apr 26, 2026
44 min

Refactoring a Personal Toolbox: Scripts versus Shell Functions

shell
shell-and-git

Personal toolboxes accumulate helpers across years of small fixes: some end up as shell functions in ‘.zshrc’, some as scripts in ‘~/bin’, often with no consistent rule for which goes where. A principled split (function only when shell state must change, versioned script otherwise) removes hundreds of lines of logic from the average dotfile, makes every helper shellcheck-able, and reduces shell startup time.

Apr 25, 2026
28 min

Building a statistical computing textbook in the Age of AI

quarto
teaching
reproducibility

A textbook demands more structural decision-making than it appears to, and drafting two at once makes every one of those decisions explicit, both under the ‘in the Age of AI’ framing.

Apr 24, 2026
19 min

A pocket terminal for your Linux laptop with ttyd and Tailscale

linux
shell
workflow-construct

A reproducible configuration for browser-based terminal access to a Linux laptop from a mobile device, using ttyd for the terminal emulation layer and Tailscale for authenticated network transport, with no public-internet exposure.

Apr 15, 2026
38 min

Dynamic Column Names in R: Seven Approaches Compared

r
metaprogramming
r-language

A comprehensive guide to adding columns with programmatically-generated names in R dataframes. Covers base R, tidyverse (classic and modern), data.table, collapse, rlang::inject(), and do.call patterns.

Feb 16, 2026
11 min

Updating an R Package: A Complete Development Workflow

r
package-development
git

The full lifecycle of modifying an R package becomes visible only when a feature branch goes through CI/CD and either passes or fails on three operating systems. This post walks through the entire process.

Feb 11, 2026
14 min

Setting Up Git for Data Science Workflows

git
reproducibility

Working without proper version control wastes more time than it saves: a single overwritten script cost me three days of work.

Feb 11, 2026
23 min

Setting Up Neovim as a Data Science IDE

neovim
vim
r
python

Neovim’s plugin ecosystem moves fast. This is a ground-up rewrite of the original setup, built around native LSP, LuaSnip, and R.nvim rather than the plugins that carried the workflow two years ago.

Feb 11, 2026
35 min

Reproducible Blog Posts with ZZCOLLAB: A Quarto Workflow

quarto
r
docker
reproducibility
zzcollab-compendia

Technical blog posts are more fragile than they look: one of my own stopped rendering six months after publication. This post documents the workflow I built to treat each blog post as a standalone ZZCOLLAB reproducible research project with Docker, renv, and CI/CD.

Feb 10, 2026
24 min

The Pipe Equivalence Myth: When f() |> g() Is Not the Same as g(f())

r
metaprogramming
r-language

Piping and nesting function calls are semantically different operations. A subtle bug in an expression- capturing wrapper reveals how R’s lazy evaluation interacts with the pipe operator.

Jan 31, 2026
14 min

Running ZZedc Independently for Clinical Research Data Management

clinical-trials
shiny
aws
reproducibility

Investigator independence in clinical data management is more achievable than it appears: I deployed ZZedc on a personal AWS instance and ran a pilot study without vendor involvement.

Dec 7, 2025
15 min

From Markdown to Blog Post: A ZZCOLLAB Conversion Workflow

quarto
zzcollab-compendia
reproducibility

A systematic workflow for converting standalone markdown documentation into professional blog posts using ZZCOLLAB symlinks and Quarto metadata.

Dec 2, 2025
12 min

Combining Observable JS and Shiny in a Single Quarto Document

quarto
shiny
javascript
r
data-visualization

Combining Observable JS and Shiny in one Quarto document is harder than it looks: every data-loading approach I tried failed except fetching from a public URL.

Dec 1, 2025
13 min

Testing Data Analysis Workflows in R

r
testing
reproducibility

Testing a data analysis pipeline systematically means applying software engineering practices from testthat and assertr to a research workflow.

Jul 25, 2025
16 min

Writing a Simple Vim Plugin for REPL Interaction

vim
r
r-packages

Writing a small plugin that sends code from an editing buffer to a running R session is the fastest way to learn how Vim’s terminal API works.

May 20, 2025
17 min

Prototyping a Shiny App with ChatGPT

r
shiny

ChatGPT is an effective prototyping partner: three prompts of iterative work produced a modular Shiny app for Palmer Penguin exploration.

May 15, 2025
19 min

A Mac Workflow for Tracking Daily Research Progress

shell
git
macos

tn is a single bash script that talks to the Gemini API directly, stores one note file per research project, and supports reviewing, editing, and deleting past entries. This post documents what the script actually does, not the three-script ChatGPT-and-clipboard sketch it replaced.

Apr 12, 2025
22 min

Clinical Trial Data Validation Across Languages and Tools

clinical-trials
data-cleaning
r
lua
javascript

Several layers of validation sit between a clinical trial data entry form and a reliable analysis dataset. This post maps them out: EDC edit checks, open-source tools, and the possibility of generating JavaScript validation from a simple spreadsheet processed by Lua.

Jan 15, 2025
26 min

Palmer Penguins Part 5: Random Forest versus Linear Models

r
random-forest
machine-learning
model-selection

A head-to-head comparison reveals that a random forest outperforms the linear model by only about one and a half percentage points, prompting reflection on the interpretability-performance tradeoff.

Jan 5, 2025
16 min

Palmer Penguins Part 4: Model Diagnostics and Interpretation

r
regression
model-selection

Verifying regression model trustworthiness through systematic diagnostic checks on linearity, normality, and influence.

Jan 4, 2025
19 min

Palmer Penguins Part 3: Cross-Validation and Model Comparison

r
cross-validation
random-forest
machine-learning
penguins-arc

Testing whether regression models hold up on new data through ten-fold cross-validation and comparison against a random forest.

Jan 3, 2025
14 min

Palmer Penguins Part 2: Multiple Regression and Species Effects

r
regression

Adding species identity to the body mass prediction model causes R-squared to jump from 0.76 to 0.85, demonstrating the power of biological groupings in multiple regression.

Jan 2, 2025
16 min

Predictive Modeling of Penguin Body Mass

r
regression
data-visualization

Regression models on the Palmer Penguins dataset reveal how much species identity shapes morphometric relationships. Simpson’s Paradox emerges clearly, reversing an apparent correlation once species is accounted for.

Jan 1, 2025
20 min

Palmer Penguins Part 1: Exploratory Data Analysis and Simple Regression

r
regression
data-visualization
penguins-arc

An exploration of how a simple flipper measurement can reveal substantial information about penguin body mass through the Palmer Penguins dataset and simple linear regression.

Jan 1, 2025
21 min

Constructing a reproducible blog post using zzcollab tools

r
zzcollab-compendia
reproducibility

The scaffold used for every blog post in this series, with the authoring instructions left in place. Copy it to start a new post; the bracketed placeholders in the body mark what the author supplies.

Jan 1, 2025
26 min
No matching items

    © 2026 Ronald G. Thomas.