RSSAmplifier

Blog

Dr. Mowinckel's

Recent content on Dr. Mowinckel's

drmowinckels.ioRSS feed ↗68 posts

Latest posts

A Rust Crate, an R Package, and One Very Stubborn Windows Crash

I had never ported a Rust crate to R, and I wanted more control over link checking than I was getting. So I wrapped lychee with extendr. This is the whole trip: why I started outside CRAN on purpose, how you run async Rust from inside R, the Windows crash that took four attempts to fix, and an honest look at whether the result was actually worth it.

Outside My Stack: Building Entracte and Cairn With Claude

I’m an R person who somehow shipped two cross-platform desktop apps in a Rust + Tauri + React stack I don’t speak natively. This post is about the process — how Entracte got built straight in code with Claude as a guide, why we took a completely different approach for Cairn (designing the whole thing as an interactive Claude artifact before writing a line of production code), and what…

Tidier Quarto Figures in Hugo: a Tiny Lua Filter

My Hugo blog renders Quarto-generated figures with my own theme&rsquo;s image render hook, which means I want figures to come out as plain markdown image syntax — not the verbose <figure> HTML that Quarto&rsquo;s hugo-md format produces by default. A short Lua filter solves this. This post walks through what the filter does, how to wire it up either per-document or project-wide via _quarto.yml ,…

Two Years of Visible: New Angles on the Long Covid Data

It&rsquo;s been two years since I started tracking my Long Covid with the Visible app, and a year since I last sat down with the data here on the blog. This post is a follow-up — same data, but now with twice as much of it, a clearer improvement arc, and some new plots and analyses I hadn&rsquo;t tried before. Calendar heatmaps, ridgeline plots, change-point detection, and a phase-by-phase look at…

Norway&#39;s New ME/CFS Guidelines Got It Backwards

The Norwegian Directorate of Health published draft guidelines for ME/CFS that recommend graded activity over pacing — the opposite of what NICE 2021 concluded and what the biomedical evidence supports. As a post-COVID patient and caretaker for someone with ME/CFS, I wrote a detailed consultation response. Here&rsquo;s what the guidelines get wrong, why it matters, and how you can respond before…

Dotfiles: Taming Your Dev Environment (and Your AI Coding Agents)

My dotfiles repo has evolved from basic shell configs to a full system that keeps my AI coding agents in sync. Here&rsquo;s how I structure it, how the skill marketplace fits in, and how symlinks tie everything together.

Why Every R Package Wrapping External Tools Needs a sitrep() Function

Stop playing &ldquo;diagnostics ping-pong&rdquo; with your users. This post explores why the _sitrep() (situation report) pattern — popularized by the usethis package — is a game-changer for R packages wrapping APIs or external software. Learn how to build structured validation functions that power both early error-handling and comprehensive system reports, featuring real-world implementation…

Year in review — 2025

A year of deliberate work despite post-COVID recovery: API explorations with httr2, the R Package Development Advent Calendar, ggseg improvements, and looking ahead to 2026.

R Package Development Advent Calendar 2025: A Complete Journey

A comprehensive guide to modern R package development, covering setup, documentation, testing, CI/CD, and CRAN submission, a summary of a social media advent calendar.

Mastering Apply: From Matrices to Multidimensional Neuroimaging Data

Deep dive into apply() for matrices and high-dimensional arrays. From basic row/column operations to complex fMRI analyses with 5D data. Learn to master the MARGIN parameter for neuroimaging and scientific computing.

Neon Ghosts with ggplot2

Make your own glowing, wiggly ghosts in R with a dash of randomness and a lot of neon.

Mapply: When You Need to Iterate Over Multiple Inputs

Learn when and how to use mapply for applying functions with multiple varying arguments. This guide shows practical examples of processing data when you need to pair multiple inputs element-wise.

Hugo modules vs. Git submodules: manage your website more easily

Explore the dynamics of Hugo modules and Git submodules in managing site dependencies efficiently. I go through their features, advantages, and practical applications in web development, centering on my experience with Hugo and Git.

Automate LinkedIn Carousels with R and Gemini

Learn how to automate LinkedIn carousel creation with R and the free Gemini API. This post details a complete workflow, from connecting to the API and summarizing a blog post into structured points, to generating a custom Quarto document ready for manual review and posting.

Decoding OAuth2 M2M with httr2: Client Setup & API Testing

This post details the process of setting up an OAuth2 Machine-to-Machine (M2M) client using the httr2 package in R. It covers client creation, handling authentication flows, and comprehensively testing API calls using the vcr package for request recording and testthat for mocking functions to ensure robust and reliable package development.

Unmasking Long Covid: PCA & Clustering Analysis of Symptom Syndromes

This blog post delves into the my personal Long Covid data, collected via the Visible app, using Principal Component Analysis (PCA). I detail four key clusters: Menstruation, Exertion, Emotional, and Neurological and then compare these clusters to the principal components derived from PCA. The analysis aims to provide a validated, data-driven framework for exploring my symptoms during this…

A year with Visible Long-Covid Tracking

This post dives into a year of tracking Long Covid symptoms and progress using the Visible app. Dr. Mowinckel, a quantitative scientist, shares their experience monitoring heart rate, heart rate variability (HRV), daily symptoms, and functional capacity using the app&rsquo;s features and the FUNCAP27 questionnaire. Discover how this data provides insights into pacing strategies, identifies…

Positron: current joys and pains

After 6 months, Positron&rsquo;s modern interface, polyglot support, & viewers are loved. Debugger quirks persist: console hangs, history issues, & tab focus. Data viewer lacks list support & labeled data. Despite pains, Positron&rsquo;s potential shines.

Harness Local LLMs and GitHub Copilot for Enhanced R Package Development

In this post I explore local large language models (LLMs) with R for code assistance, using tools like chores, ensure, gander, and continue in Positron. The post explores R options and keybindings for various tools, adjusting settings to optimize performance. Lastly, I switch to GitHub Copilot for better results, encountering rate limits but finding workarounds to control autocomplete triggers.

Cracking the LinkedIn API through R

I share my experience integrating R with the LinkedIn API, focusing on personal authentication and posting processes. The documentation and workflow were complex, but with help from the rOpenSci community, I successfully navigated the challenges. I detail steps for API access, authentication, and creating posts, highlighting key obstacles like managing OAuth tokens, API products, and endpoints.

The difficult year

A deeply personal reflection on a challenging year with long COVID, highlighting the journey through illness, rehab, support from loved ones, and small victories. Despite physical limitations, resilience shines through monthly blog updates, a newsletter, and plans for gradual recovery in the coming year.

Posting to Bluesky from R

With the recent mass exodus from Xitter, Bluesky has emerged as a new home for the R community. Discover how to join the community with starter packs and automate posting to Bluesky from R using GitHub Actions. Explore detailed steps for setup and automation, making it easy to share your latest blog posts on social media platforms.

Reading in multiple files without loops

Learn how to use apply-functions in R to read multiple files efficiently. This guide covers the basics of using sapply and lapply to iterate over files quickly, eliminating the need for loops.

Creating post summary with AI from Hugging Face

Optimize your blog&rsquo;s SEO and Zenodo metadata with automated summaries using Hugging Face&rsquo;s text summarization models. Learn how to connect to the Hugging Face API, prepare content, and integrate summaries into your markdown files using R and the httr2 package.

Making your blog FAIR

Making your blog FAIR (Findable, Accessible, Interoperable, and Reusable) by archiving posts on Zenodo and adding DOIs. Learn how to use Hugo, GitHub actions, and the Zenodo API to ensure your content is preserved. Enhance your blog&rsquo;s visibility and reliability.

Positron IDE - A new IDE for data science

Positron, an IDE developed for data science, combines the best features of RStudio and Visual Studio Code. Learn about its features, customization options, and extensions. Discover how Positron compares to other popular IDEs and why it&rsquo;s a promising tool for data scientists.

Improving your GitHub Profile

Improve your GitHub profile with these tips. Learn how to create a repository with your username, add stats, coding skills, preferred IDEs, blog stats, and more. Customize your profile to make it engaging and showcase your skills and interests effectively.

Customise your R startup message

Customize your R startup experience by modifying the R startup message, adding useful system information, and fun elements like a praise or colour bar. Learn how to edit the .Rprofile file, clear the console, print system details, and add a personalised message using the {praise} and {cli} packages for an enjoyable R session.

The IDEs I use

Explore my programming IDE journey, from MATLAB and gedit to RStudio and VSCode. Learn about the strengths of each IDE for different languages and tasks, and why I switch between RStudio and VSCode depending on the project. Insights on optimizing your coding environment for efficiency and productivity.

Too much git cleaning

Learn how to handle git mistakes and recover lost work with simple solutions. Explore commands like git clean and git reset , and discover how to undo mistakes using ctrl + z in RStudio. Gain confidence in your git journey with tips from experienced developers and helpful resources.

Setting up a Freesurfer LMM through R

Learn to create model matrices for Freesurfer Linear Mixed Models (LMM) in R using built-in functions. This guide walks you through manually creating model matrices, utilizing the model.matrix function, and standardizing variables. Includes creating a function to streamline the process, making neuroimaging data analysis more efficient.

Teaching you - teaching me

Teaching is rewarding, especially in coding workshops. Reflecting on experiences from Digital Scholarship Days at the University of Oslo, I learned valuable lessons from learners about Quarto slides, project management, and teaching challenges. Continuous improvement in teaching methods benefits both instructors and learners.

Hugo Igloo theme

This is a theme for creating a website theme for the Hugo static site generator. The Hugo Igloo&#xA;theme is the theme of my website and created using UIkit 3.

New year, New blog

Reflecting on the past years, I&rsquo;ve focused on significant career milestones, volunteer work, and a new website revamp. Highlights include leading a new Core Facility at the University of Oslo, attending Posit::conf 2023, contributing to R-Ladies, rOpenSci, and R-Hub communities. My new Hugo Igloo theme offers a fresh look for my website.

Reorganising Hugo Content and Aliasing

Revamping a website and organizing content can be challenging. Here&rsquo;s how I restructured my blog posts into yearly subfolders using a Bash script, added Hugo aliases for seamless redirects, and simplified file slugs for cleaner URLs. This automation ensures better content organization and link integrity.

Posit::conf 2023

Attending Posit::conf (formerly RStudio::conf) in Chicago was an exhilarating experience filled with learning, speaking engagements, insightful workshops, and connecting with the R and Data Science communities. Highlights included workshops on R fundamentals and package development, exciting updates on Quarto, and invaluable networking opportunities.

Advent of R Functions

Explore 15 essential pieces of R code to streamline your data analysis and visualization workflow. From creating directories and handling files to customizing ggplot and working with logit scales, these snippets can help you enhance your programming efficiency and maintain cleaner scripts.

Let&#39;s Get Apply&#39;ing

Learn to replace loops with vectorized apply functions in R for efficient data manipulation. This guide covers converting loops to functions using sapply and mapply, enhancing your programming skills by making code more readable and less error-prone.

R and the Tidyverse for working with data

Workshop : How to work efficiently with datasets in R using the Tidyverse, a Carpentries-style workshop.&#xA;The workshop is intended to be interactive, was initially developed to be run as a webinar, and can be expanded to single or two whole day workshop.&#xA;The workshop is intended both for R beginners as well as intermediate R users who know base-R well but wish to learn more about the…

Rmarkdown Child Templates

Generate automated reports in Rmarkdown by creating reusable child templates. Learn to call child documents from a main Rmd using knitr and environment variables, enabling efficient and flexible report generation for survey data analysis. Follow this guide to streamline your workflow and reduce repetitive code.

Adding giscus to your blogdown site

Switch from Disqus to Giscus for comments on your Hugo site using blogdown. This guide shows how to integrate Giscus, a GitHub discussions-based comment section, into your blog seamlessly. Learn how to set up Giscus, modify your theme, and customize the comment section for a streamlined experience.

Using GitHub Actions to Build your Hugo Website

Learn to build Hugo websites using GitHub Actions and deploy them with Netlify. This guide covers setting up GitHub Actions to build your site, install dependencies, render Rmarkdown files, and deploy to Netlify or GitHub Pages. Enhanced control and maintenance for your site, with step-by-step instructions.

New {ggseg} with Geom!

We released a new version of the ggseg R-package for visualizing brain atlases. It features a geom_brain function and position_brain for flexible brain slice positioning in ggplot2. This update enhances atlas plotting, offering more customization and improved visuals.

New Year&#39;s Wishes

Here&rsquo;s a ggplot2 holiday card wishing you a better 2021! Explore how to create a festive holiday plot in R with ggplot2. Understanding the preparation of data for plotting, using geom_circle , adding blur effects, and customizing text. This exercise enhances your skills in working with ggplot2 and thinking critically about data structures and visual outputs.

R-Package Advent Calendar 2020

This year, I started a Twitter advent calendar showcasing one R-package per day, each of which I find essential for my work. The aim is to highlight useful packages, both familiar and lesser-known, and offer insights into their functionalities. Follow along to discover packages from CRAN, BioConductor, GitHub, and more, and perhaps find new tools to enhance your work.

Quartaki - Introduction to Quarto

Workshop : A 6 hour introduction to Quarto for report generation in R. Combining code with prose to create reports in a seamless environment. This workshop is taught with RStudio and R, but learners proficient in other compatible languages are welcome to join.

The ggseg-suite

R-Packages : A set of packages for visualizing brain atlas data in R.&#xA;The packages create the possibility of visualizing brain atlas data directly in 2d fully inflated brains or brain slices through ggplot2, and as 3d mesh plots through plotly.&#xA;They are intended to create easier workflows for researchers working in R and neuroimaging, reducing the need to switch between software too often.

The Linear Regression Family in R

Linear regression is essential in psychology, often disguised as t-tests or ANOVAs. This guide explains running linear models in R, comparing t-tests, Pearson correlations, ANOVAs, ANCOVAs, and more. Understand how to specify models, run tests, and interpret them with real data examples. Gain confidence in translating your hypotheses into linear models and applying statistical methods effectively.

Changing your Blogdown Workflow

Updating my hugo setup on netlify took over a year of delays due to complexities. After extensive work, I transitioned from knitting .html to .md , fixed theme issues, and resolved netlify CSS problems. Follow my step-by-step guide to smoothly update your blogdown website. Learn to make use of hugo&rsquo;s page bundles, adjust configurations, and ensure seamless rendering both locally and on…

Using Freesurfer annotation files to plot in R

For neuroimaging, toggling between R and imaging software like FSL or Freesurfer is common. We segment large 3D brain data into meaningful regions. Our ggseg and ggseg3d packages visualize the brain&rsquo;s Desikan-Killany atlas in 2D and 3D. Learn the steps to convert Freesurfer annotation files to mesh files using the ggsegExtra package for enhanced brain data visualization.