<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Home on Nan Xiao | 肖楠</title>
    <link>https://nanx.me/</link>
    <description>Recent content in Home on Nan Xiao | 肖楠</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Tue, 10 Mar 2026 03:45:00 +0000</lastBuildDate>
    <atom:link href="https://nanx.me/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Becoming a Vibe Maintainer</title>
      <link>https://nanx.me/blog/post/vibe-maintainer/</link>
      <pubDate>Tue, 10 Mar 2026 03:45:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/vibe-maintainer/</guid>
      <description>Back in 2018, I started awesome-shiny-extensions, a curated list of Shiny extension packages in R (and now +Python). What began as a small collection of around 130 packages has grown into something much bigger than I expected: nearly 500 packages and 1.6k GitHub stars. But I will be honest: for the last couple of years, I have been what you might call “vibe maintaining” this list. I update it when I feel like it, which means not very often.</description>
    </item>
    <item>
      <title>Intellectual Minimalism</title>
      <link>https://nanx.me/blog/post/intellectual-minimalism/</link>
      <pubDate>Sun, 22 Feb 2026 22:05:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/intellectual-minimalism/</guid>
      <description>Over the weekend, I gave this site a new look. The Hugo theme has been migrated from Bootstrap to Tailwind CSS, but honestly, the framework change was the least interesting part. The interesting part was the excuse it gave me to rethink what a personal site should feel like in the age of intelligence abundance.&#xA;A wall with dried flowers and a straw hat. Photo by Olivie Strauss. What do I want the site to feel like?</description>
    </item>
    <item>
      <title>Noto Sans Mono with Fira Code ligatures</title>
      <link>https://nanx.me/blog/post/noto-sans-mono-ligaturized/</link>
      <pubDate>Mon, 02 Feb 2026 20:11:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/noto-sans-mono-ligaturized/</guid>
      <description>Following my ligaturized DM Mono project, I’ve applied the same idea to Noto Sans Mono. You can download it from GitHub: nanxstats/noto-sans-mono-ligaturized.&#xA;Liga Noto Sans Mono in action: Running brew info in Ghostty. Theme: Dracula+. Why Noto Sans Mono? Noto Sans Mono is designed by Steve Matteson and is the monospaced member of the Noto type family. Its design is closely related to Open Sans, one of the most popular humanist sans-serif typefaces on the web.</description>
    </item>
    <item>
      <title>Introducing pytest-r-snapshot: Verifying Python code against R outputs at scale</title>
      <link>https://nanx.me/blog/post/pytest-r-snapshot/</link>
      <pubDate>Fri, 02 Jan 2026 03:32:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/pytest-r-snapshot/</guid>
      <description>An earthy, minimalist display blending textured art with dried and fresh botanicals.&#xA;Photo by Toa Heftiba. First package in the new year: I’m glad to announce pytest-r-snapshot, a pytest plugin for snapshot testing Python code against reference outputs generated by R.&#xA;You can install it from PyPI:&#xA;pip install pytest-r-snapshot If your project uses uv, add it as a development dependency:&#xA;uv add --dev pytest-r-snapshot Why snapshot testing against R?</description>
    </item>
    <item>
      <title>revdeprun 2.1.0: hunting bottlenecks and a new speedrun record</title>
      <link>https://nanx.me/blog/post/revdeprun-2-1-0/</link>
      <pubDate>Wed, 24 Dec 2025 19:01:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/revdeprun-2-1-0/</guid>
      <description>A race car pit crew in action during a pit stop. Photo by Paul Krüger. I’m excited to announce revdeprun 2.1.0, a major update to my Rust CLI tool for automating R package reverse dependency checks. This release is really two updates in one: version 2.0.0 accelerated dependency installation, while 2.1.0 addressed two more bottlenecks I discovered during testing. The combined result is a much faster workflow from start to finish.</description>
    </item>
    <item>
      <title>DM Mono with Fira Code ligatures</title>
      <link>https://nanx.me/blog/post/dm-mono-ligaturized/</link>
      <pubDate>Sat, 06 Dec 2025 23:57:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/dm-mono-ligaturized/</guid>
      <description>I’ve created a ligaturized version of DM Mono by adding Fira Code ligatures. You can download it from GitHub: https://github.com/nanxstats/dm-mono-ligaturized.&#xA;Ligaturized DM Mono in action: Running Homebrew in Ghostty. Theme: Dracula+. Why ligatures? I’ll confess: I can’t start real work until I’ve found a coding font that fits the vibe of the day. My dotfiles are fairly basic, but they include an extensive list of free and commercial monospaced fonts that I rotate through regularly.</description>
    </item>
    <item>
      <title>Reverse dependency check speedrun: a data.table case study</title>
      <link>https://nanx.me/blog/post/revdep-speedrun/</link>
      <pubDate>Wed, 05 Nov 2025 08:51:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/revdep-speedrun/</guid>
      <description>Monument Valley Navajo Tribal Park. Photo by Elvis Liang. A week ago, I announced revdeprun, a Rust CLI tool for automating R package reverse dependency checks. Since then, I have been iterating rapidly: 16 crates.io releases in a week! These updates focused on both correctness and speed. The tool has evolved from its initial v0.1.0 to v1.4.2, and the workflow now leverages pak for dependency resolution and xfun for the checking1.</description>
    </item>
    <item>
      <title>revdeprun: Rust CLI for R package reverse dependency check automation</title>
      <link>https://nanx.me/blog/post/revdeprun/</link>
      <pubDate>Mon, 27 Oct 2025 17:42:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/revdeprun/</guid>
      <description>Smoke and speed: a race car mid-drift on the track. Photo by Jack Stapleton. Update (2025-10-31): revdeprun 1.0.0 switched to using a custom workflow to pre-install binary dependencies for checking reverse dependencies, and run parallel checks using xfun::rev_check(). This significantly improves performance and reliability. Read the release notes here. This post has been updated to reflect these changes.&#xA;I’m glad to announce the release of revdeprun, a Rust CLI tool that makes it easy to run reverse dependency checks on cloud instances1.</description>
    </item>
    <item>
      <title>ggsci 4.0.0: 400&#43; new color palettes</title>
      <link>https://nanx.me/blog/post/ggsci-4-0-0/</link>
      <pubDate>Thu, 25 Sep 2025 23:36:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/ggsci-4-0-0/</guid>
      <description>Cozy autumn vibes: a warm drink, a good book, and colorful leaves. Photo by Alisa Anton. After the last update in June 2024, I am excited to announce the release of ggsci 4.0.0 and ggsci for Python 1.0.0. You can install the R package ggsci from CRAN:&#xA;install.packages(&amp;quot;ggsci&amp;quot;) And install the Python package from PyPI:&#xA;pip install ggsci This update brings over 400 new discrete color palettes for ggplot2 and plotnine visualizations.</description>
    </item>
    <item>
      <title>Introducing py-ggsci: ggsci color palettes for plotnine in Python</title>
      <link>https://nanx.me/blog/post/ggsci-python/</link>
      <pubDate>Mon, 15 Sep 2025 02:05:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/ggsci-python/</guid>
      <description>Cliff Walk at Pourville (1882) by Claude Monet: two women on a grassy cliff above the sea under a bright sky. Public domain. Source: Art Institute of Chicago. I’m thrilled to announce the release of py-ggsci, a Python package that brings the popular ggsci color palettes from R’s ggplot2 ecosystem to Python’s plotnine library.&#xA;You can install py-ggsci from PyPI:&#xA;pip install ggsci Here is a quick example using the Observable 10 palette introduced in ggsci 3.</description>
    </item>
    <item>
      <title>The trash can has become the trashed can</title>
      <link>https://nanx.me/blog/post/trash-can/</link>
      <pubDate>Mon, 01 Sep 2025 23:01:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/trash-can/</guid>
      <description>A Vanitas Still Life with a Flag, Candlestick, Musical Instruments, Books, Writing Paraphernalia, Globes, and Hourglass, 1662. Edwaert Collier (Dutch, 1642–1708).&#xA;Scan from the Art Institute of Chicago. I have posted exclusively technical content on this blog for the past five years. Today, I want to write something different.&#xA;I have been using a 45-liter step trash can with a soft-close lid in the kitchen. Most of it is plastic.</description>
    </item>
    <item>
      <title>Markdown Stupefy: Tidy AI Text in VS Code</title>
      <link>https://nanx.me/blog/post/vscode-markdown-stupefy/</link>
      <pubDate>Fri, 15 Aug 2025 01:32:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/vscode-markdown-stupefy/</guid>
      <description>The extension name was inspired by the “stupefy mode” described in the SmartyPants project written by John Gruber, the creator of Markdown. If you copy AI responses into Markdown, you will often get curly quotes, em dashes, emojis, and other smart punctuation. They look fine, but they are Unicode characters that can trip linters and clutter diffs. So I built a tiny tool to fix that.&#xA;Automate tidying AI text Markdown Stupefy is a VS Code extension that normalizes smart punctuation to plain ASCII, removes emojis, and cleans up trailing whitespace.</description>
    </item>
    <item>
      <title>Refactoring the GPU Selector App with Claude Code: A Vibe Coding Experiment</title>
      <link>https://nanx.me/blog/post/claude-code-vibe-refactor/</link>
      <pubDate>Fri, 13 Jun 2025 01:03:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/claude-code-vibe-refactor/</guid>
      <description>Desk setup with plants. Photo by Amari James. In January 2023, I built a basic, interactive deep learning GPU selector app inspired by Tim Dettmers’ popular guide. The original project was a pure HTML + JavaScript + CSS “vibe coding” experiment, driven by chat with GPT-3.5, which was the SOTA at the time. While the core logic worked, I did not focus much on its UI or UX.&#xA;Now, two and a half years later, I wanted to see how far agentic coding assistants have come, by refactoring the app with modern tools and design sensibilities.</description>
    </item>
    <item>
      <title>My First PyCon Experience</title>
      <link>https://nanx.me/blog/post/my-first-pycon-experience/</link>
      <pubDate>Tue, 03 Jun 2025 00:15:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/my-first-pycon-experience/</guid>
      <description>A flamingo peeking through the plants. National Aviary, Pittsburgh, PA. Photo by Adam Custer. I attended PyCon US 2025 in Pittsburgh, Pennsylvania from May 16–18, 2025. As my first Python conference, I wanted to document the most interesting things I learned.&#xA;Why a statistician goes to PyCon? It might seem odd for a statistician to focus on any particular programming language. But I’m not your typical statistician. As Dijkstra said:</description>
    </item>
    <item>
      <title>pkgdown.offline: Build pkgdown websites without an internet connection</title>
      <link>https://nanx.me/blog/post/pkgdown-offline/</link>
      <pubDate>Sat, 10 May 2025 01:02:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/pkgdown-offline/</guid>
      <description>On the grid but off the line. Logo font: Founders Grotesk Condensed Semibold. I’m pleased to announce that the R package pkgdown.offline is now available on CRAN. You can install it with:&#xA;install.packages(&amp;quot;pkgdown.offline&amp;quot;) pkgdown.offline enables you to build pkgdown websites in environments without internet access, such as private, restricted development workflows or CI/CD pipelines. It achieves this by bundling the essential frontend assets (CSS, JavaScript) that pkgdown typically fetches online and by providing alternative implementations for key pkgdown functions like init_site() and build_site().</description>
    </item>
    <item>
      <title>Customizing Inter with alternative optical sizing presets</title>
      <link>https://nanx.me/blog/post/inter-optical-sizing/</link>
      <pubDate>Mon, 21 Apr 2025 22:35:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/inter-optical-sizing/</guid>
      <description>A cylinder casting a circular and rectangular shadow on two perpendicular planes, showing how perspective shapes interpretation of a single form. 3D render by Daniels Joffe. Since its open source release in 2017, Inter has become a widely adopted sans-serif font, especially popular for web content and user interfaces that benefit from a clean, neo-grotesque style. Thoughtful glyph redesigns in versions 4.0 and 4.1 (released since 2023) have further enhanced its technical maturity and visual appeal.</description>
    </item>
    <item>
      <title>Optimize R foreach loops for parallelism: avoid the .combine argument</title>
      <link>https://nanx.me/blog/post/r-foreach-combine/</link>
      <pubDate>Mon, 24 Mar 2025 20:05:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/r-foreach-combine/</guid>
      <description>Cute boat in a glass bottle. Art generated by FLUX.1 [dev] + cozy-book-800 LoRA adapter. The benchmarking script used in this post is available as a GitHub Gist.&#xA;This post recommends avoiding the use of foreach(.combine = &#34;rbind&#34;) in parallel loops in R. Instead, manually combine the results after the foreach() call using functions like data.table::rbindlist() or dplyr::bind_rows().&#xA;Performance issues with rbind() The do.call(rbind, list) pattern in R is an expressive and functional way to bind data frames from a list into a single data frame.</description>
    </item>
    <item>
      <title>R packages using Rust</title>
      <link>https://nanx.me/blog/post/r-rust-pkgs/</link>
      <pubDate>Fri, 28 Feb 2025 16:37:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/r-rust-pkgs/</guid>
      <description>TL;DR: I’m curating a list of CRAN R packages that use Rust: nanxstats/r-rust-pkgs.&#xA;Dirt bike. Photo by POWERING OFFROAD. Rust in R packages Rust has been the most admired programming language for nearly a decade. CRAN, the largest public repository for R packages, has also supported integrating Rust in R packages for several years. What’s the magic behind the language?&#xA;To me, Rust is a great choice for writing high-performance extensions for both R and Python, offering memory safety and a strong ecosystem.</description>
    </item>
    <item>
      <title>Introducing rtflite for Python</title>
      <link>https://nanx.me/blog/post/rtflite-python/</link>
      <pubDate>Thu, 13 Feb 2025 00:06:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/rtflite-python/</guid>
      <description>Touring in the clouds. Photo by Clement Delhaye. This is a guest post generously contributed by Yilong Zhang, a biostatistician at Meta.&#xA;It is my pleasure to introduce rtflite, a new Python package for generating RTF documents. A preview version is now available on PyPI. You can install it with:&#xA;pip install rtflite The ultimate goal of rtflite is to provide a lightweight solution for generating production-ready tables, listings, and figures (TLFs) in RTF format.</description>
    </item>
    <item>
      <title>Prevent RStudio 2024.12.0 from adding ProjectID to .Rproj files</title>
      <link>https://nanx.me/blog/post/rstudio-projectid/</link>
      <pubDate>Sun, 09 Feb 2025 20:42:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/rstudio-projectid/</guid>
      <description>Git diff showing the ProjectID field added by RStudio 2024.12.0.&#xA;Terminal: Ghostty. Theme: Dracula+. Font family: Iosevka Term. Update (2025-02-13): The issue still exists in RStudio 2024.12.1. The fix still applies.&#xA;Update (2025-03-05): The issue has been fixed in RStudio &amp;gt;= 2025.04.0+323.&#xA;TL;DR: The fix The following script detects newly added ProjectID lines in .Rproj files using git diff. If detected, it removes the line and saves the modified .</description>
    </item>
    <item>
      <title>Introducing pkglite for Python</title>
      <link>https://nanx.me/blog/post/pkglite-python/</link>
      <pubDate>Thu, 16 Jan 2025 02:11:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/pkglite-python/</guid>
      <description>Les Menuires, France. Photo by Yann Allegre. I am pleased to introduce pkglite for Python, now available on PyPI. pkglite for Python provides a minimalist framework for packing source packages written in any programming language into a text file and restoring them to their original directory structure. You can install it with:&#xA;pip install pkglite For installation as a global command-line tool, use pipx:&#xA;pipx install pkglite Context Four years ago, we released the R package pkglite, designed for bidirectional conversion of R packages.</description>
    </item>
    <item>
      <title>Customize testthat snapshot directory with monkey patching</title>
      <link>https://nanx.me/blog/post/testthat-snapshot-monkey-patch/</link>
      <pubDate>Sun, 05 Jan 2025 22:58:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/testthat-snapshot-monkey-patch/</guid>
      <description>Memories instant photo. Photo by Kelly Sikkema. Problem Snapshot testing has been supported in testthat since testthat 3.0.0. By default, snapshot files are saved to a hardcoded directory:&#xA;tests/testthat/_snaps/ Unfortunately, testthat does not provide a public API to customize this directory. This question has been raised in issues like r-lib/testthat#1623, suggesting that customizing the snapshot directory is a valid use case.&#xA;Solution Without a public API, the most practical solution is to modify testthat’s internal behavior at runtime through monkey patching.</description>
    </item>
    <item>
      <title>Skip RStudio splash screen</title>
      <link>https://nanx.me/blog/post/rstudio-splash-screen/</link>
      <pubDate>Tue, 17 Dec 2024 00:42:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/rstudio-splash-screen/</guid>
      <description>Skating at Venice Beach, Los Angeles. Photo by Josh Hild. Update (2025-05-05): RStudio release planned for August 2025 will include a global option to turn off the splash screen and support click-to-close behavior.&#xA;Starting with RStudio IDE version 2024.12.0+467, a redesigned splash screen replaces the previous app logo. This change was introduced in rstudio/rstudio#15347 and it looks like this:&#xA;New splash screen design in RStudio IDE 2024.12+. While visually polished, the new splash screen feels slightly too shiny (no pun intended) and adds a delay to the perceived time before I can first interact with the UI.</description>
    </item>
    <item>
      <title>tinyvdiff: Minimalist visual regression testing plugin for pytest</title>
      <link>https://nanx.me/blog/post/tinyvdiff/</link>
      <pubDate>Wed, 04 Dec 2024 21:53:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/tinyvdiff/</guid>
      <description>Hummingbirds. Photo by Zdeněk Macháček. I’m delighted to announce my second Python package, tinyvdiff, now available on PyPI. It offers a lightweight pytest plugin for detecting appearance changes in visual content, such as figures or documents. You can install it with:&#xA;pip install tinyvdiff Setup and usage Here is an example test for matplotlib graphics, from the tinyvdiff demo project:&#xA;import pytest from tinyvdiff_demo.matplotlib import generate_plot @pytest.fixture def temp_pdf(tmp_path): &amp;quot;&amp;quot;&amp;quot;Fixture to create a temporary PDF file path&amp;quot;&amp;quot;&amp;quot; return tmp_path / &amp;quot;test.</description>
    </item>
    <item>
      <title>tinytopics: GPU-accelerated topic modeling via constrained neural Poisson NMF</title>
      <link>https://nanx.me/blog/post/tinytopics/</link>
      <pubDate>Sat, 26 Oct 2024 20:42:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/tinytopics/</guid>
      <description>Downhill mountain biking. Photo by Tim Foster. I’m excited to share that my first Python package, tinytopics, is now available on PyPI. You can install it using&#xA;pip install tinytopics tinytopics is a minimalist solution designed to scale up topic modeling tasks on CPUs and GPUs using PyTorch.&#xA;Motivation Fitting topic models at scale using classical algorithms on CPUs can be slow. Carbonetto et al. (2022) demonstrated the equivalence between Poisson non-negative matrix factorization (NMF) and multinomial topic model likelihoods.</description>
    </item>
    <item>
      <title>FLUX.1 &#43; LoRA for styled image generation</title>
      <link>https://nanx.me/blog/post/flux-lora/</link>
      <pubDate>Mon, 30 Sep 2024 23:47:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/flux-lora/</guid>
      <description>Technical line drawing generated by Flux1.dev + LoRA adapter.&#xA;Prompt: techlinedrawing, a drawing of a glass-heavy, modern architecture that Californian venture capital firms like, with fine details and mountains in the back, white background. Besides playing the Elden Ring: Shadow of the Erdtree DLC and Black Myth: Wukong on my gaming rig, I’ve also been playing with open weights generative AI models lately. As always, I’m more than impressed by the speed of innovation in this space.</description>
    </item>
    <item>
      <title>Group sequential trials in industry: a 30-year perspective</title>
      <link>https://nanx.me/blog/post/group-sequential-trials-industry-30-years/</link>
      <pubDate>Sat, 28 Sep 2024 03:42:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/group-sequential-trials-industry-30-years/</guid>
      <description>Photo by Estée Janssens. Update (May 11, 2025): The paper discussed in this post has been selected as one of the recipients of the 2025 Best Paper Award from Statistics in Biopharmaceutical Research (SBR)! It is a wonderful honor to see our work recognized by the journal.&#xA;I’m delighted to share that our paper, Some Group Sequential Trials From Industry Over the Last 30 Years, has been published in Statistics in Biopharmaceutical Research.</description>
    </item>
    <item>
      <title>R command-line tool paths on Windows</title>
      <link>https://nanx.me/blog/post/r-windows-paths/</link>
      <pubDate>Sun, 15 Sep 2024 19:28:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/r-windows-paths/</guid>
      <description>Mirror House. Photo by Karsten Winegeart. I’m glad to share a new repository that documents the essential R command-line tool paths on Windows: https://github.com/nanxstats/r-windows-paths.&#xA;Motivation As an R developer, I frequently set up new development and testing environments for my R packages on Windows. This process often involves installing several command-line tools alongside R, including but not limited to:&#xA;Rtools: Compiles C/C++/Fortran code. TinyTeX: Compiles reference manual and PDF vignettes.</description>
    </item>
    <item>
      <title>ssw is on CRAN</title>
      <link>https://nanx.me/blog/post/ssw-0-2-0/</link>
      <pubDate>Sun, 08 Sep 2024 19:07:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/ssw-0-2-0/</guid>
      <description>Cape Cod sand dunes on a cloudy day. Photo by Nicholas Bartos. I’m excited to share that my R package ssw is now available on CRAN. This package began as a weekend project in 2020. ssw offers an R interface for SSW (Zhao et al. 2013), a high-performance C/C++ implementation of the Smith-Waterman algorithm for sequence alignment using SIMD.&#xA;You can install ssw from CRAN with:&#xA;install.packages(&amp;quot;ssw&amp;quot;) For clarity, I will refer the R package as ssw-r from now on.</description>
    </item>
    <item>
      <title>ggsci 3.2.0: new color palettes from Observable, Bootstrap, and Tailwind CSS</title>
      <link>https://nanx.me/blog/post/ggsci-3-2-0/</link>
      <pubDate>Sat, 06 Jul 2024 00:20:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/ggsci-3-2-0/</guid>
      <description>Villa in Zurich, perspective view. From “Moderne Architektur” (Modern Architecture), edited by Lambert &amp;amp; Stahl, Stuttgart, 1891. Scan from Europeana. I am delighted to announce the release of ggsci 3.2.0. The R package ggsci was first released in 2016. It offers a range of ggplot2 color scales drawn from various sources, including scientific publications, data visualization tools, sci-fi movies, and television series.&#xA;To install ggsci from CRAN, use:&#xA;install.packages(&amp;quot;ggsci&amp;quot;) As a follow-up to the ggsci 3.</description>
    </item>
    <item>
      <title>You should (maybe) enable font ligatures when building with GPT models</title>
      <link>https://nanx.me/blog/post/gpt-models-font-ligatures/</link>
      <pubDate>Wed, 19 Jun 2024 03:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/gpt-models-font-ligatures/</guid>
      <description>Parts of a typewriter. Photo by Florian Klauer. The token &amp;lt;|endoftext|&amp;gt; is a special token used as a document separator for OpenAI GPT models. It has become quite prevalent if you look closely:&#xA;It has been used since GPT-2 and remains present in the OpenAI API for their latest models. Their tokenizer package, tiktoken, includes logic to process text with these special tokens. The markup &amp;lt;| and |&amp;gt; is widely used in the code bases of LangChain and text-generation-webui.</description>
    </item>
    <item>
      <title>ggsci 3.1.0, ggsurvfit example, and reverse dependency check</title>
      <link>https://nanx.me/blog/post/ggsci-3-1-0/</link>
      <pubDate>Thu, 23 May 2024 00:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/ggsci-3-1-0/</guid>
      <description>Photo by Elena Mozhvilo. I am excited to announce the release of ggsci 3.1.0. ggsci is an R package that provides a collection of color palettes inspired by colors used in scientific journals, data visualization libraries, science fiction movies, and TV shows.&#xA;To install ggsci from CRAN, run:&#xA;install.packages(&amp;quot;ggsci&amp;quot;) This release introduces a new color scale and brings documentation improvements. This post demonstrates how to create a Kaplan-Meier plot using ggsurvfit, cowplot, and ggsci.</description>
    </item>
    <item>
      <title>msaenet 3.1.2 and a sparse survival modeling example</title>
      <link>https://nanx.me/blog/post/msaenet-3-1-2/</link>
      <pubDate>Sun, 12 May 2024 20:10:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/msaenet-3-1-2/</guid>
      <description>Father-Son Tennis. Photo by Lucas Davies. I’m pleased to announce that msaenet 3.1.2 is now available on CRAN.&#xA;You can install msaenet with:&#xA;install.packages(&amp;quot;msaenet&amp;quot;) If you frequently build sparse linear models, msaenet can help you generate more parsimonious solutions with adaptive estimations. It supports any number of adaptive estimation steps, flexible initialization methods, multiple model selection criteria, and automatic parallel parameter tuning.&#xA;New color palette This is a more focused update compared to the 3.</description>
    </item>
    <item>
      <title>stackgbm is on CRAN</title>
      <link>https://nanx.me/blog/post/stackgbm-0-1-0/</link>
      <pubDate>Tue, 30 Apr 2024 08:10:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/stackgbm-0-1-0/</guid>
      <description>A group of sheep on Faroe Islands. Photo by Dylan Shaw. I’m happy to announce that stackgbm, a minimalist R package for tree model stacking, is now on CRAN. Model stacking is an ensemble learning method that combines the predictions from multiple base learners to improve overall performance. stackgbm makes it easy to stack gradient boosting decision tree (GBDT) models, which are particularly effective for classification tasks.&#xA;You can install stackgbm with:</description>
    </item>
    <item>
      <title>R Package Release Notes: ggsci, protr, and msaenet (Spring 2024)</title>
      <link>https://nanx.me/blog/post/ggsci-protr-msaenet-release-notes-2024/</link>
      <pubDate>Sun, 21 Apr 2024 19:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/ggsci-protr-msaenet-release-notes-2024/</guid>
      <description>Cute market in Rome, Italy. Photo by Mark Pecar. Maintaining R packages is a significant time and effort commitment. The Releasing to CRAN chapter of the R Packages book provides an excellent overview of the many responsibilities package authors face. Henrik’s CRANhaven also helps me appreciate the efforts made by both CRAN maintainers and package maintainers to keep a consistent, high standard on software quality and integration within a single, trusted repository.</description>
    </item>
    <item>
      <title>Prompt LLMs with R Package Source Code Using pkglite</title>
      <link>https://nanx.me/blog/post/pkglite-llm-prompt/</link>
      <pubDate>Thu, 28 Mar 2024 20:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/pkglite-llm-prompt/</guid>
      <description>Illustration from Google DeepMind. Artist: Martina Stiftinger. Sometimes, large language models (LLMs) answer coding questions by making up software behaviors or APIs that don’t exist. A simple but effective strategy to minimize such hallucination problems is to feed the exact, complete source code as context in the prompt. For code organized in R packages, it is tedious to copy the file contents and construct them into prompts manually. Fortunately, you can use pkglite to automate this process.</description>
    </item>
    <item>
      <title>Use STIX Fonts in R Markdown and Quarto for Readability</title>
      <link>https://nanx.me/blog/post/stixfonts/</link>
      <pubDate>Mon, 15 Jan 2024 21:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/stixfonts/</guid>
      <description>Seashore with Shipwreck by Moonlight by Caspar David Friedrich. I have been playing a lot of Elden Ring lately. After investing 200 (!) hours into it, I learned three valuable lessons:&#xA;Life is hard. Something that seems unachievable today doesn’t mean it will be tomorrow. Explore, learn, practice, and with efforts, and perhaps a little luck, suddenly, you’ve done it. Life is unfair. You can choose to play aggressively, play conservatively, or even move on—just don’t be greedy.</description>
    </item>
    <item>
      <title>protr 1.7-0</title>
      <link>https://nanx.me/blog/post/protr-1-7-0/</link>
      <pubDate>Fri, 10 Nov 2023 21:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/protr-1-7-0/</guid>
      <description>3D render from Google DeepMind. Artist: Wes Cockx. I am glad to announce the release of protr 1.7-0. Install it from CRAN with:&#xA;install.packages(&amp;quot;protr&amp;quot;) You can also install it from conda-forge in Python.&#xA;First released in 2012, protr was my very first open source R package. The package generates representations for protein sequences such as numerical features and similarity measures. Since its inception, protr has evolved after 21 CRAN releases by incorporating user feedback.</description>
    </item>
    <item>
      <title>9 Questions About Adaptive Design</title>
      <link>https://nanx.me/blog/post/nine-questions-about-adaptive-design/</link>
      <pubDate>Fri, 06 Oct 2023 11:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/nine-questions-about-adaptive-design/</guid>
      <description>Muir Woods trails. Photo by Caleb Jones. For someone who has worked in the industry for years, one thing I miss about school is the Socratic method of teaching used by some professors. It involves asking and answering questions to encourage critical thinking. By engaging in thoughtful Q&amp;amp;A sessions, I often find myself understanding the core elements of complex topics better compared to reading textbooks or papers alone.&#xA;To me, adaptive clinical trial design is one of these complex topics.</description>
    </item>
    <item>
      <title>Base R Shortcuts: A Repository of Efficient Base R Coding Patterns</title>
      <link>https://nanx.me/blog/post/r-base-shortcuts/</link>
      <pubDate>Tue, 27 Jun 2023 22:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/r-base-shortcuts/</guid>
      <description>TL;DR: Please help me extend this GitHub repo by adding your own base R programming idioms: https://github.com/nanxstats/r-base-shortcuts.&#xA;Snowboarder on a cloudy hill. Photo by Boba Jovanovic. For a long time, I’ve told people that I am not an R expert. I don’t know too much about R. I just happen to write software that encounters the least resistance when implemented in R. I’m shy. I’d rather solve problems myself than ask.</description>
    </item>
    <item>
      <title>Create Engaging Word Cloud Visualizations from Your Research</title>
      <link>https://nanx.me/blog/post/research-word-cloud/</link>
      <pubDate>Fri, 23 Jun 2023 21:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/research-word-cloud/</guid>
      <description>Many outstanding researchers and labs have created visualizations of their research using word clouds. In this post, I present a simple, automated “paper2wordcloud” workflow to create eye-catching word cloud visualizations. It combines the efficiency of automation with the power of human intuition and aesthetic sense. The figure below was created using my published papers.&#xA;A word cloud visualization generated for my papers using this workflow. The general steps in the workflow are:</description>
    </item>
    <item>
      <title>Rethinking the Word Cloud Generator</title>
      <link>https://nanx.me/blog/post/rethinking-word-cloud-generator/</link>
      <pubDate>Mon, 19 Jun 2023 18:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/rethinking-word-cloud-generator/</guid>
      <description>As part of my JavaScript learning journey, I created a fork of Jason Davies’ word cloud generator and added some new features with a few adjustments to the default parameters. The fork is hosted at nanx.me/wordcloud/ and the source code is available on GitHub. Here is an example word cloud produced by the generator:&#xA;A word cloud visualization for ChatGPT release notes produced by the generator with default parameters. Font: Founders Grotesk Condensed Regular (included with macOS).</description>
    </item>
    <item>
      <title>Context-Free R Package Release Checklist Generation with usethis</title>
      <link>https://nanx.me/blog/post/r-package-release-checklist/</link>
      <pubDate>Mon, 12 Jun 2023 20:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/r-package-release-checklist/</guid>
      <description>The release checklist generation function described in this post is also available in this GitHub Gist.&#xA;Photo by David Marcu. Software release at scale An agile, automated, and reliable release process is a key component of continuous delivery for modern software engineering teams. In particular, releasing new versions of R packages often involves going through a sequence of manual and automated checks to ensure quality and compliance. To scale up such efforts within a development team, it is crucial to follow a consistent release checklist.</description>
    </item>
    <item>
      <title>Fix the &#39;non-numeric argument to binary operator&#39; Error in R Markdown and Quarto</title>
      <link>https://nanx.me/blog/post/knitr-chunk-option-error/</link>
      <pubDate>Tue, 06 Jun 2023 20:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/knitr-chunk-option-error/</guid>
      <description>Rubber duck debugging. Photo by Timothy Dykes. If Google leads you here, you probably assigned a character value to a knitr chunk option such as fig.width or fig.height that only accepts numeric values, and your are trying to render that R Markdown or Quarto document.&#xA;The exact error message you encountered looks like this:&#xA;Error in `options[[sprintf(&amp;quot;fig.%s&amp;quot;, i)]] * options$dpi`: ! non-numeric argument to binary operator Backtrace: 1. rmarkdown::render(&amp;quot;example.Rmd&amp;quot;, encoding = &amp;quot;UTF-8&amp;quot;) 2.</description>
    </item>
    <item>
      <title>Responsive Design for Statistical Graphics with Shiny and ggplot2</title>
      <link>https://nanx.me/blog/post/responsive-design-for-statistical-graphics/</link>
      <pubDate>Mon, 05 Jun 2023 01:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/responsive-design-for-statistical-graphics/</guid>
      <description>Photo by Amy Shamblen. If you have written any Shiny apps, you are probably familiar with the idea of responsive web design, which focuses on web page layouts adaptive to screen size and popularized by the front-end frameworks such as Bootstrap.&#xA;Could the similar idea be applied to statistical graphics? In my opinion, the answer is yes, and the idea can be helpful for arranging multi-panel graphics under the context of creating effective visualizations that are adaptive to any screen sizes.</description>
    </item>
    <item>
      <title>Sparse Index Tracking with msaenet and CVXR: A Two-Stage Regression Approach</title>
      <link>https://nanx.me/blog/post/sparse-index-tracking/</link>
      <pubDate>Wed, 31 May 2023 01:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/sparse-index-tracking/</guid>
      <description>The code to reproduce the results in this post is also available here.&#xA;The illusion of choice. Photo by Kenny Eliason. Disclaimer The content in this blog post is for educational and research purposes only. It is not intended to be investment advice, and the author is not a licensed financial advisor. Any investment decisions should be based on your own analysis and consultation with a licensed financial advisor. The author is not responsible for any financial losses or damages resulting from the use of this information.</description>
    </item>
    <item>
      <title>Find Your Perfect Open Source Font: Introducing the Interactive Typeface Lookbook</title>
      <link>https://nanx.me/blog/post/open-source-typography/</link>
      <pubDate>Wed, 10 May 2023 17:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/open-source-typography/</guid>
      <description>Majesty Palm. Photo by Kara Eads. Introduction There are more than 1,500 open source font families available on Google Fonts, presenting designers and developers with an extensive, yet often overwhelming, array of options. With such a vast selection, it can be challenging to sift through and find the perfect typeface for your projects, let alone remember the hidden gems you may have come across in the past.&#xA;To address this challenge, I started Open Source Typography, an opinionated, curated lookbook of outstanding open source fonts.</description>
    </item>
    <item>
      <title>Compressing PNG Output for R Packages with pngquant and ragg</title>
      <link>https://nanx.me/blog/post/rpkgs-pngquant-ragg/</link>
      <pubDate>Sun, 09 Apr 2023 00:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/rpkgs-pngquant-ragg/</guid>
      <description>Cassette collection. Photo by Jametlene Reskp. Introduction Dealing with large-scale image outputs in R packages can be challenging, especially when it comes to passing CRAN checks. In this post, I will share my experience in using pngquant and ragg to compress the PNG output size for readme and vignettes. This allows R packages with many figures in their documentation to pass the CRAN checks without compromising image quality.&#xA;Problem description I encountered a problem with my package, ggsci, which outputs approximately 30 example figures from both vignettes and README.</description>
    </item>
    <item>
      <title>Bolden Your Typography in R Markdown and Quarto with MLModern</title>
      <link>https://nanx.me/blog/post/mlmodern/</link>
      <pubDate>Mon, 20 Mar 2023 16:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/mlmodern/</guid>
      <description>A visual comparison between Latin Modern (blue) and MLModern (red) at the same size. You probably have created PDF documents using R Markdown or Quarto. The default look and feel of these documents are driven by the default typeface, Computer Modern, or its extended implementation, Latin Modern.&#xA;To me, these default typefaces work fine, but they could be “thicker” to be more legible on HiDPI and Retina displays. MLModern offers such a sturdy rendition of the Computer Modern design.</description>
    </item>
    <item>
      <title>ggsci 3.0.0</title>
      <link>https://nanx.me/blog/post/ggsci-3-0-0/</link>
      <pubDate>Wed, 08 Mar 2023 11:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/ggsci-3-0-0/</guid>
      <description>3D render from Rodion Kutsaiev. I am delighted to announce the release of ggsci 3.0.0. ggsci provides a collection of color palettes inspired by colors used in scientific journals, data visualization libraries, science fiction movies, and TV shows.&#xA;You can install it from CRAN with:&#xA;install.packages(&amp;quot;ggsci&amp;quot;) This version brings 7 new color palettes under 3 color scales (COSMIC, Flat UI, Frontiers), multiple improvements, and a new FAQ vignette, giving you more options to create effective data visualizations using ggplot2.</description>
    </item>
    <item>
      <title>Deep Learning GPU Selector</title>
      <link>https://nanx.me/blog/post/gpu-selector/</link>
      <pubDate>Sun, 29 Jan 2023 22:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/gpu-selector/</guid>
      <description>I built a GPU selector for deep learning workflows at nanx.me/gpu/, based on the recommendations from the blog post written by Tim Dettmers.&#xA;You can use this tool to decide the GPU you need for general training or inference needs by answering a few yes/no questions. It was a simple, pure client-side JavaScript implementation (GitHub repo).&#xA;AI and sustainability. Artwork from DeepMind. Artist: Nidia Dias. I first saw Tim’s post when the Ampere series was released in 2020.</description>
    </item>
    <item>
      <title>A General-Purpose Link Checker for R Markdown and Quarto Projects</title>
      <link>https://nanx.me/blog/post/rmarkdown-quarto-link-checker/</link>
      <pubDate>Mon, 16 Jan 2023 20:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/rmarkdown-quarto-link-checker/</guid>
      <description>The link checker code in this post is also available in this GitHub Gist.&#xA;Puffins in the rain, Iceland. Photo by Yves Alarie.&#xA;Previously on link checking… We discussed the link rot issue before. We also built a simple link checker for blogdown projects based on the XML sitemap generated by Hugo. In reality, I maintain many more bookdown projects and Quarto projects than blogdown projects. Searching site: bookdown::bookdown_sitealso shows that there are 10,000+ bookdown projects hosted on GitHub alone.</description>
    </item>
    <item>
      <title>Announcing My First VS Code Extension: textmate.rstheme</title>
      <link>https://nanx.me/blog/post/vscode-textmate-rstheme/</link>
      <pubDate>Mon, 02 Jan 2023 20:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/vscode-textmate-rstheme/</guid>
      <description>TL;DR: I published my first VS Code extension/theme on Visual Studio Marketplace, with the source hosted on GitHub. Try it out today.&#xA;A screenshot for editing R Markdown documents with the theme. Syntax highlighting provided by vscode-R. Captured with IBM Plex Mono at 18px. It was not until late in my life that I realized my eyes were sensitive to the visual aesthetics of things. To make things worse, I care about them very much, at least in the name of productivity and inspiration.</description>
    </item>
    <item>
      <title>New Paper Published: eCTD Submission with Analysis Using R</title>
      <link>https://nanx.me/blog/post/ectd-pkglite-paper/</link>
      <pubDate>Wed, 28 Sep 2022 11:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/ectd-pkglite-paper/</guid>
      <description>Photo by DeepMind.&#xA;I am thrilled to share that our paper, Electronic Common Technical Document Submission with Analysis Using R, is published online today in Clinical Trials. We have selected the open access (OA) option to ensure that everyone in the community can check out the full text freely.&#xA;A simple solution to a complex problem Our article presented a viable path to prepare proprietary R assets for submission, following the electronic common technical document (eCTD) specification.</description>
    </item>
    <item>
      <title>GUI Automation with RobotJS</title>
      <link>https://nanx.me/blog/post/gui-automation-robotjs/</link>
      <pubDate>Mon, 05 Sep 2022 20:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/gui-automation-robotjs/</guid>
      <description>The code in this post is also available in this GitHub Gist.&#xA;Disclaimer: the tools and configurations mentioned in this post are only discussed as technical examples; they do not constitute an endorsement. Use at your own risk.&#xA;Photo by Martin Reisch. Today’s internet is not like it was 20 years ago for an older millennial like me. Only judging by its appearance, the internet today is plagued with cookie consent popups and paywalls.</description>
    </item>
    <item>
      <title>Training Tissue-Specific Gene Embeddings on GTEx Data</title>
      <link>https://nanx.me/blog/post/exp2vec/</link>
      <pubDate>Sun, 21 Aug 2022 19:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/exp2vec/</guid>
      <description>The gene embedding training code is available from https://github.com/nanxstats/exp2vec.&#xA;The Shiny app is at https://nanx.shinyapps.io/exp2vec/, with code available from https://github.com/nanxstats/exp2vec-shiny.&#xA;Photo by Amy Shamblen.&#xA;Background We can often observe a mysterious connection between natural languages and the human genome when count data is derived from them. It is also straightforward to model them using the latest statistical or machine learning approaches developed for each field and borrow ideas from each other.</description>
    </item>
    <item>
      <title>Automate HTML to PDF Printing with {promises} and {chromote}</title>
      <link>https://nanx.me/blog/post/chromote-pdf-automation/</link>
      <pubDate>Sat, 20 Aug 2022 00:15:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/chromote-pdf-automation/</guid>
      <description>The R code in this post is also available in this GitHub Gist.&#xA;Photo by Bank Phrom.&#xA;chromote is an R package that allows one to automate tasks driven by web browsers. It works by providing an API to communicate with Chromium-based browsers via the Chrome DevTools Protocol (CDP). For example, CDP can help us load and print HTML pages to PDF files programmatically, similar to what one could do in the web browser GUI but with mouse clicks.</description>
    </item>
    <item>
      <title>The Past and Future of Shiny Keynote at rstudio::conf(2022)</title>
      <link>https://nanx.me/blog/post/shiny-keynote-rstudio-conf/</link>
      <pubDate>Wed, 17 Aug 2022 20:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/shiny-keynote-rstudio-conf/</guid>
      <description>I constantly feel lucky to witness the growth of the R web framework, Shiny, in the past ten years. In his keynote speech at rstudio::conf 2022, Joe Cheng shared an excellent summary of Shiny’s achievements and exciting outlook.&#xA;I am deeply moved by the story about how Shiny was created and Joe’s journey, and I recommend you watch the talk recording below if you haven’t. Notably, after Hadley’s Mastering Shiny book, the community-maintained awesome list awesome-shiny-extensions was again highlighted in Joe’s talk from 24:00 to 24:33 (thanks so much for the shout-out!</description>
    </item>
    <item>
      <title>Parsing Human-Readable Text Data with Readability.js and R</title>
      <link>https://nanx.me/blog/post/r-readability-parser/</link>
      <pubDate>Tue, 02 Aug 2022 01:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/r-readability-parser/</guid>
      <description>The R and JavaScript code to reproduce the results in this post is available from https://github.com/nanxstats/r-readability-parser.&#xA;Photo by Nick Hillier. Update (2023-09-04): Browserify support was removed in jsdom v22.0.0. This post has been updated to recommend installing jsdom v20.0.0 to ensure the code examples work as intended. The original versions of JS libraries in the GitHub repo remain unchanged, as they continue to function correctly.&#xA;Readability.js Maybe you have used tools like rvest to harvest text data from web pages.</description>
    </item>
    <item>
      <title>The zlib Algorithm for Text/Binary File Classification</title>
      <link>https://nanx.me/blog/post/txtvsbin/</link>
      <pubDate>Tue, 14 Jun 2022 20:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/txtvsbin/</guid>
      <description>The R code in this post is also available at this GitHub Gist.&#xA;Photo by Alp Duran.&#xA;Intro In some situations, we want to know whether a file is a text file or a binary file programmatically. For example, as a text editor developer, you can use this information to choose the correct editing interface (text editor or hex editor). Similarly, if you want to pack or compress a collection of files into a compact format, it helps to know the type of file before encoding them.</description>
    </item>
    <item>
      <title>Sensible Defaults</title>
      <link>https://nanx.me/blog/post/sensible-defaults/</link>
      <pubDate>Tue, 07 Jun 2022 00:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/sensible-defaults/</guid>
      <description>Photo by Thomas Reaubourg. gtsummary The other day, I looked into Daniel Sjoberg’s gtsummary package for summarizing tabular data and regression models. The README says:&#xA;The {gtsummary} package summarizes data sets, regression models, and more, using sensible defaults with highly customizable capabilities.&#xA;The concept of having sensible defaults in (research) software immediately resonated with me. Ideally, the default settings in software should be able to support the majority of users’ needs.</description>
    </item>
    <item>
      <title>Honey, I Serialized the Data</title>
      <link>https://nanx.me/blog/post/r-serialize-timemachine/</link>
      <pubDate>Sun, 01 May 2022 20:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/r-serialize-timemachine/</guid>
      <description>The R code to reproduce the results in this post is available from https://github.com/nanxstats/r-serialize-timemachine.&#xA;Photo by Alex Gogan.&#xA;A mystery on serialize() Serialization/deserialization is an important topic for exchanging data efficiently at scale. In R, there is a native choice for this: serialize()/unserialize() and their more convenient interface saveRDS()/readRDS().&#xA;Yihui once asked why the first 14 bytes in R serialized data were skipped in digest::digest(), instead of the first 17 bytes for the binary format, as the additional three filling zero-bytes are always there.</description>
    </item>
    <item>
      <title>Five Minute Shiny: Skeleton Loading Screen</title>
      <link>https://nanx.me/blog/post/shiny-loading-skeleton/</link>
      <pubDate>Sun, 24 Apr 2022 21:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/shiny-loading-skeleton/</guid>
      <description>The Shiny app template is available from nanxstats/shiny-loading-skeleton. Preview the demo at shinyapps.io.&#xA;Mosaic American Gothic. Original photo by Simon Lee.&#xA;Let’s implement a “skeleton loader” for Shiny apps. A typical animated skeleton loading screen looks like this:&#xA;A demo Shiny app with a skeleton loader. Recorded with QuickTime and converted by gifski.&#xA;Compared to the traditional loading screens provided by tools like waiter, the skeleton loading screen is a prominent way to show the app is currently loading and can give users an idea of the incoming page structure.</description>
    </item>
    <item>
      <title>Five Minute Shiny: File Input Area Widget</title>
      <link>https://nanx.me/blog/post/shiny-file-input-area/</link>
      <pubDate>Sun, 17 Apr 2022 21:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/shiny-file-input-area/</guid>
      <description>The R code in this post is also available as this GitHub Gist.&#xA;Photo by Willian Justen de Vasconcellos&#xA;Our goal today is to implement a file input area widget for Shiny. Compared to a regular file input button, a larger file input UI helps users focus on the task where an upload action is the central flow of the web application.&#xA;Fortunately, the native shiny::fileInput() offers a solid foundation for customization, as it already supports both click-to-browse and drag-and-drop for file selection.</description>
    </item>
    <item>
      <title>Five Minute Shiny: Implement the Switch Input with Bootstrap 5</title>
      <link>https://nanx.me/blog/post/shiny-bs5-switches/</link>
      <pubDate>Thu, 14 Apr 2022 00:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/shiny-bs5-switches/</guid>
      <description>The R code in this post is also available as this GitHub Gist.&#xA;Photo by Zonduurzaam Deventer. Bootstrap 4 and 5 have expanded the types of UI components compared to version 3. On the other hand, the available UI inputs and outputs in Shiny have been relatively stable while being carefully made compatible across different Bootstrap versions through bslib.&#xA;Since we can already leverage the native UI components in Bootstrap 5 via bslib, it would be fun to create the R wrappers for the “missing” inputs that were not available in Bootstrap 3.</description>
    </item>
    <item>
      <title>Building Paginated News Lists in R Markdown and Shiny with DT</title>
      <link>https://nanx.me/blog/post/dt-news-list/</link>
      <pubDate>Sun, 10 Apr 2022 01:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/dt-news-list/</guid>
      <description>The R code in this post is also available as this GitHub Gist.&#xA;Mosaic Mondrian. Original photo by Simon Lee.&#xA;Context and motivation A single-file R Markdown document often generates single-page HTML outputs. Similarly, Shiny is a single-page application framework. The single-page nature of these outputs makes it challenging to create experiences like pagination to display long and sophisticated lists, which is usually accomplished by creating multiple pages and URL routing.</description>
    </item>
    <item>
      <title>Adaptive ggplot2 Color Scales with Color Interpolation</title>
      <link>https://nanx.me/blog/post/ggplot2-color-interpolation/</link>
      <pubDate>Wed, 06 Apr 2022 01:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/ggplot2-color-interpolation/</guid>
      <description>Photo by Mateo Giraud. My R package ggsci has included a few popular discrete color palettes. The colors values in these palettes are not automatically generated from a color space but hand-picked instead, often containing only five to ten distinct colors. A frequent question from the users is: What should I do when the colors are running out due to a more significant number of categories in the data?</description>
    </item>
    <item>
      <title>Architecting Large Shiny Apps with Minimal First Contentful Paint Time</title>
      <link>https://nanx.me/blog/post/shiny-fcp-loader/</link>
      <pubDate>Wed, 30 Mar 2022 22:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/shiny-fcp-loader/</guid>
      <description>The Shiny app skeleton is available from nanxstats/shiny-fcp-loader.&#xA;Pantheon, Roma, Italy. Photo by Emma Fabbri.&#xA;More than a few people asked me similar questions about this when building large shiny apps. Therefore, it might be time to formulate a simple solution with a minimalist yet extensible code demo.&#xA;UX side effects of large Shiny apps For larger Shiny apps, users could wait a long time (in terms of 10s of seconds) with an awkward blank screen before seeing the rendered app content.</description>
    </item>
    <item>
      <title>A Simple Link Checker for Hugo and Blogdown Websites</title>
      <link>https://nanx.me/blog/post/link-checker/</link>
      <pubDate>Tue, 22 Feb 2022 20:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/link-checker/</guid>
      <description>Photo by Katie Treadway.&#xA;Some background I have been blogging with Hugo/blogdown for a while. One housekeeping task I have always wanted to automate with R is scanning the entire website to ensure that all the links are still working. It is essential for maintaining an enjoyable reading experience without archiving too many external links.&#xA;Conceptually, the requirement for a generic broken link checker is quite simple:&#xA;Get the links to all pages on the site.</description>
    </item>
    <item>
      <title>Font Variant Numeric</title>
      <link>https://nanx.me/blog/post/font-variant-numeric/</link>
      <pubDate>Wed, 19 Jan 2022 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/font-variant-numeric/</guid>
      <description>TL;DR: If you use the native font stack (the default in Bootstrap 4+), check the numbers displayed in tables, especially on Apple’s platforms.&#xA;Photo by Jen Theodore.&#xA;A new problem Many of the content creation frameworks that support HTML output in the R world are getting upgraded to Bootstrap 4+:&#xA;Shiny and R Markdown can use bslib to customize Bootstrap version; The three-column Bootstrap style for bookdown projects; The pkgdown 2.</description>
    </item>
    <item>
      <title>More Than 1,500 File Extensions Are Used Inside R Packages</title>
      <link>https://nanx.me/blog/post/cran-file-exts/</link>
      <pubDate>Wed, 01 Dec 2021 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/cran-file-exts/</guid>
      <description>The R code to reproduce the results is available from the GitHub repo nanxstats/cran-file-exts.&#xA;Photo by Pawel Czerwinski. When applied correctly, file extensions can be informative. They are the very first clue on handling a specific file without parsing the file content.&#xA;To properly capture and classify files in source R packages, I am interested in learning what file extensions are frequently used by R packages.&#xA;We can achieve this easily by downloading all R packages available from CRAN one at a time and collect the file extensions inside:</description>
    </item>
    <item>
      <title>Build a PC During the Great GPU Shortage</title>
      <link>https://nanx.me/blog/post/build-a-pc-during-the-great-gpu-shortage/</link>
      <pubDate>Sun, 26 Sep 2021 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/build-a-pc-during-the-great-gpu-shortage/</guid>
      <description>Photo by Will Porada.&#xA;Apparently, I underestimated the severity of the ongoing GPU shortage when I decided to Marie Kondo my previous PC build and build a new one: people almost cannot find ANY graphics cards at a reasonable price for a custom build. After checking a few prebuilt options where one does not need to find a card, I still feel all the options out there are not optimal.</description>
    </item>
    <item>
      <title>Rebranding R Packages with Hexagon Stickers: A Minimalist Approach</title>
      <link>https://nanx.me/blog/post/rebranding-r-packages-with-hexagon-stickers/</link>
      <pubDate>Mon, 08 Feb 2021 01:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/rebranding-r-packages-with-hexagon-stickers/</guid>
      <description>A new hex sticker wall of my R packages. I have built a few R packages over the years. I have always been adding some forms of an ad hoc logo to them, trying to make a visual impression. As the portfolio size grows larger, I realized that I would need a principled way to create the logos and refresh my packages’ look. Hexagon stickers seem to be an acceptable form of logos that are heavily used by the R community.</description>
    </item>
    <item>
      <title>Bayesian Lasso with greta</title>
      <link>https://nanx.me/blog/post/bayesian-lasso-with-greta/</link>
      <pubDate>Mon, 07 Dec 2020 20:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/bayesian-lasso-with-greta/</guid>
      <description>The R code to reproduce the results is available from GitHub Gist.&#xA;Horseshoe Bend, Arizona. Photo by Madeline Pere. Although I am not an expert in Bayesian statistics, I always have an idealized version of the framework for Bayesian modeling in my mind:&#xA;Allows defining data models intuitively — preferably in native R. Handles the low-level computations such as MCMC automatically. Works on both CPU and GPU seamlessly would be perfect for 2020.</description>
    </item>
    <item>
      <title>Tanka: A Minimalist Bootstrap 4 Theme for Hugo and Blogdown</title>
      <link>https://nanx.me/blog/post/hugo-tanka-theme-bootstrap/</link>
      <pubDate>Mon, 23 Nov 2020 22:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/hugo-tanka-theme-bootstrap/</guid>
      <description>TL;DR: I have rewritten the Hugo Tanka theme entirely using Bootstrap 4 while still keeping its original look and feel. This should also fix the compatibility issues from Hugo version updates.&#xA;A screenshot of the updated Hugo Tanka theme.&#xA;Almost three years ago, when I first started blogging with Hugo/blogdown, I forked and modified a Hugo theme Black &amp;amp; Light, and named it Tanka (Repo, Live Preview).&#xA;Hugo has received several major updates in the past three years.</description>
    </item>
    <item>
      <title>Fuzz Testing Your R Code</title>
      <link>https://nanx.me/blog/post/fuzz-testing-your-r-code/</link>
      <pubDate>Mon, 28 Sep 2020 22:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/fuzz-testing-your-r-code/</guid>
      <description>Good software requires even better testing. Particularly, unit testing has been widely used by many R packages as a tool for reducing the number of bugs and improving code structure. A unit test is often written when a single unit of functionality is created in the program. Is there a good way to test a large program or system after it is created? The answer is yes, and one of the approaches people developed is fuzz testing.</description>
    </item>
    <item>
      <title>Migrating from Disqus to Utterances</title>
      <link>https://nanx.me/blog/post/migrating-from-disqus-to-utterances/</link>
      <pubDate>Sat, 19 Sep 2020 23:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/migrating-from-disqus-to-utterances/</guid>
      <description>Safari 14 introduced a new UI component that I cannot love more: a privacy report detailing all the third-party trackers blocked by WebKit’s Intelligent Tracking Prevention (ITP). Following this progress and removing Google Analytics last year, I decide to finish my part today by purging Disqus (comes with unsolicited tracking) from this website.&#xA;Privacy Report in Safari 14 showing the cross-site trackers that Intelligent Tracking Prevention (ITP) blocked.&#xA;The process is much easier than I thought.</description>
    </item>
    <item>
      <title>Customize Syntax Highlighting for R distill Websites</title>
      <link>https://nanx.me/blog/post/distill-syntax-highlight/</link>
      <pubDate>Fri, 22 May 2020 00:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/distill-syntax-highlight/</guid>
      <description>“Diversity is essential to happiness, and in Utopia there is hardly any.” (Bertrand Russell) Photo by @chuttersnap.&#xA;The Problem The distill (formerly radix) package offers an excellent option in the R Markdown ecosystem to create beautifully typed websites. I was using it one day and looking into customizing the syntax highlighting theme. Then I found this issue:&#xA;I was a bit surprised and sad that there is no easy way to customize it.</description>
    </item>
    <item>
      <title>Disposable Computing with callr</title>
      <link>https://nanx.me/blog/post/disposable-computing-with-callr/</link>
      <pubDate>Sat, 11 Apr 2020 17:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/disposable-computing-with-callr/</guid>
      <description>Photo by @uniqueton.&#xA;Runtime errors can be tricky and costly to resolve for any programming language, and these errors frequently happen when managing (file) connections. Boris posted such an issue when using my R package Rcpi. I rephrase it here as:&#xA;library(&amp;quot;Rcpi&amp;quot;) dir.create(&amp;quot;test&amp;quot;) for (i in 1:2000) { file.copy( system.file(&amp;quot;compseq/DB00530.sdf&amp;quot;, package = &amp;quot;Rcpi&amp;quot;), paste0(&amp;quot;test/&amp;quot;, i, &amp;quot;.sdf&amp;quot;) ) } fns &amp;lt;- list.files(&amp;quot;test/&amp;quot;, pattern = &amp;quot;.sdf$&amp;quot;, full.names = TRUE) for (i in 1:length(fns)) { cat(&amp;quot;\014&amp;quot;, i, &amp;quot;\n&amp;quot;) Rcpi::convMolFormat(infile = fns[i], outfile = &amp;quot;temp.</description>
    </item>
    <item>
      <title>Self-Hosting Shiny Apps with Linode and Cloudflare</title>
      <link>https://nanx.me/blog/post/self-host-shiny-apps/</link>
      <pubDate>Wed, 26 Feb 2020 01:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/self-host-shiny-apps/</guid>
      <description>After procrastinating for some time, I finally set up a dedicated self-hosting server, nanx.app, for my public shiny apps. From now on, most of the web applications listed on my software page will be available from two mirrors — the self-hosting server and the public cloud hosting solution shinyapps.io kindly provided by Posit.&#xA;A collection of my shiny apps, now also self-hosted. The Motivation I have built many shiny apps over the years — a few of them are public and open source.</description>
    </item>
    <item>
      <title>New Packages on CRAN: tidycwl and biocompute</title>
      <link>https://nanx.me/blog/post/tidycwl-biocompute/</link>
      <pubDate>Sat, 14 Dec 2019 00:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/tidycwl-biocompute/</guid>
      <description>On the journey of achieving reproducibility in genomic data analysis projects, one often faces challenges with documenting workflows and computations systematically. To provide one way for tackling these problems, we (me and my colleagues) have recently released two new R packages — tidycwl and biocompute — to CRAN.&#xA;tidycwl As the name implies, the package tidycwl aims at offering a native toolchain for R to analyze tools and workflows written in the Common Workflow Language (CWL), while following the tidyverse design principles.</description>
    </item>
    <item>
      <title>Building Regularized Logistic Regressions from Scratch with Computational Graphs in R</title>
      <link>https://nanx.me/blog/post/cgraph-logreg/</link>
      <pubDate>Sun, 06 Oct 2019 00:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/cgraph-logreg/</guid>
      <description>The R package built for this post is available on GitHub: nanxstats/logreg.&#xA;Update 2020-02-11: there has been some major API updates and improvements since cgraph 5.0.0. The logreg package is now updated to reflect these changes. The code example in this post is updated, too.&#xA;As one of the cornerstones for deep learning frameworks, automatic differentiation was briefly mentioned in our previous post. Today let’s focus on the other important piece: the computational graph.</description>
    </item>
    <item>
      <title>Peak Experience</title>
      <link>https://nanx.me/blog/post/peak-experience/</link>
      <pubDate>Wed, 02 Oct 2019 22:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/peak-experience/</guid>
      <description>Photo by Elena Prokofyeva.&#xA;I feel that we have previously talked a lot about the material world in this blog. Today I want to briefly discuss something more spiritual, something in my mind for a while: peak experience.&#xA;This concept belongs to the self-actualization part described in Maslow’s “hierarchy of needs”. The peculiar thing is, I knew what the feeling was but cannot express it verbally, until the day I knew the term coined by the psychologists.</description>
    </item>
    <item>
      <title>64GB RAM</title>
      <link>https://nanx.me/blog/post/64gb-ram/</link>
      <pubDate>Tue, 11 Jun 2019 22:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/64gb-ram/</guid>
      <description>In 2018, I built a PC to train models with GPU. Besides the GPU, the machine has a 6-core (12 threads) CPU and 32GB of RAM. The hardware was nothing fancy compared to a lot of deep learning builds but gets the job done.&#xA;Recently, I experienced an issue that probably all R users experienced: running out of memory. Not for training neural networks, but for training some more traditional statistical learning models.</description>
    </item>
    <item>
      <title>Removing Google Analytics from All My Websites</title>
      <link>https://nanx.me/blog/post/remove-google-analytics/</link>
      <pubDate>Mon, 28 Jan 2019 15:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/remove-google-analytics/</guid>
      <description>Like cameras, online trackers are everywhere. Photo by Matthew Henry. What happened After using it (or being used) for about ten years, today I consciously removed the Google Analytics tracking code from all the personal websites I control, including this blogdown (Hugo) site, the pkgdown sites for my R packages, and my Shiny apps. I never felt better, as from now on, people are browsing my websites tracking-free.&#xA;Why I did it I think the blog posts by the pioneers who realized this before explained the economic reasons pretty well.</description>
    </item>
    <item>
      <title>A List of Awesome Shiny Extension Packages</title>
      <link>https://nanx.me/blog/post/awesome-shiny-extensions/</link>
      <pubDate>Tue, 04 Dec 2018 14:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/awesome-shiny-extensions/</guid>
      <description>“Everything looks official with tiny leaves around it.” Original photo by Kelli Tungay.&#xA;TL;DR: here is a curated list of R packages that offer extended UI or server components for Shiny: nanxstats/awesome-shiny-extensions. Pull requests welcomed!&#xA;Five years ago, I wrote my first research software paper, and it eventually got published in Bioinformatics. If you know me, it’s probably not surprising that the paper was about an R package and a companion Shiny app.</description>
    </item>
    <item>
      <title>Renga: A Clean Bootstrap 4 Theme for Hugo and Blogdown</title>
      <link>https://nanx.me/blog/post/hugo-renga-theme/</link>
      <pubDate>Sat, 10 Nov 2018 23:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/hugo-renga-theme/</guid>
      <description>For a long time, I have been maintaining my homepage and the portfolio pages (software, papers) with HTML purely written by hand. Skeleton was my frontend framework for about five years, then I switched to Bootstrap 4 this year. After I (re)-started blogging at the end of last year, things got a bit complicated. The blog and the portfolio pages don’t get a consistent look (the</description>
    </item>
    <item>
      <title>General-Purpose Programming with R</title>
      <link>https://nanx.me/blog/post/general-purpose-programming-with-r/</link>
      <pubDate>Thu, 25 Oct 2018 23:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/general-purpose-programming-with-r/</guid>
      <description>“They’ll take your soul if you let them — don’t let them.” (Carole King, You’ve Got a Friend) Photo by Jelleke Vanooteghem.&#xA;I used R for almost every single computational task I do on my computer in the past ten years. I use R for things that are not simply statistics (pun intended), but everything related to data, or everything that can be done programmatically.&#xA;Recently, I found a fascinating thread posted in the r/rstats subreddit.</description>
    </item>
    <item>
      <title>The Accidental Product Success</title>
      <link>https://nanx.me/blog/post/accidental-product-success/</link>
      <pubDate>Mon, 15 Oct 2018 21:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/accidental-product-success/</guid>
      <description>A roadmap may tell how you can get there but doesn’t tell you where to go. Photo by @slidebean. Technology companies are sometimes quirky but always quite interesting.&#xA;Often, we can witness accidental epic wins in products that don’t belong to a company’s main offerings. A few examples from the (almost) trillion dollar club:&#xA;Microsoft is a software company, but they have made some excellent hardware products, especially accessories. Recently, they even remastered the legendary IntelliMouse, an ergonomic mouse designed for office use but highly acclaimed in the gaming community.</description>
    </item>
    <item>
      <title>Implementing Triplet Losses for Implicit Feedback Recommender Systems with R and Keras</title>
      <link>https://nanx.me/blog/post/triplet-loss-r-keras/</link>
      <pubDate>Wed, 29 Aug 2018 19:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/triplet-loss-r-keras/</guid>
      <description>All the R code for this post is available on GitHub: nanxstats/deep-learning-recipes.&#xA;Photo: Three Palms by Jamie Davies&#xA;At the end of our last post, I briefly mentioned that the triplet loss function is a more proper loss designed for both recommendation problems with implicit feedback data and distance metric learning problems. For its importance in solving these practical problems, and also as an excellent programming exercise, I decided to implement it with R and Keras.</description>
    </item>
    <item>
      <title>How a Financial Crisis Started</title>
      <link>https://nanx.me/blog/post/how-a-financial-crisis-started/</link>
      <pubDate>Wed, 29 Aug 2018 14:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/how-a-financial-crisis-started/</guid>
      <description>Photo by Ablimit Ablet on Unsplash I once read a joke with some dry humor a long time ago. It’s almost a parable about how the system amplifies fragility. I’m not entirely sure where it originated, but here you go:&#xA;A bunny bounced into a bakery and asked the baker: “do you have 100 croissants?”&#xA;The baker: “Ahh, I’m so sorry we don’t have that many.”&#xA;The bunny: “Oh… okay.</description>
    </item>
    <item>
      <title>Prototyping a Recommender System for Binary Implicit Feedback Data with R and Keras</title>
      <link>https://nanx.me/blog/post/recsys-binary-implicit-feedback-r-keras/</link>
      <pubDate>Wed, 22 Aug 2018 17:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/recsys-binary-implicit-feedback-r-keras/</guid>
      <description>Ten years ago, the Netflix prize competition made a significant impact on recommender systems research. In the same time, such benchmark datasets, including MovieLens, are a bit misleading: in reality, implicit feedback data, or binary implicit feedback data (someone interacted with something) could be the best we can have. One to five star ratings type of continuous response data could be challenging to get or impossible to measure.&#xA;Photo: One in A Million by Veronica Benavides</description>
    </item>
    <item>
      <title>Building My First Deep Learning Machine</title>
      <link>https://nanx.me/blog/post/building-my-first-deep-learning-machine/</link>
      <pubDate>Mon, 20 Aug 2018 15:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/building-my-first-deep-learning-machine/</guid>
      <description>Five years ago, GNOME 3’s immaturity was one of the reasons for me to switch to a Mac. After finished watching two seasons of Mr. Robot, I somehow missed it. With my AWS/GCP bills going up quite a bit recently, I quickly decided to invest a little and build a PC to retry the Linux desktop environment, also, to tackle some personal machine learning projects.&#xA;Hardware Here is my PCPartPicker part list for the parts of choice.</description>
    </item>
    <item>
      <title>My OCD for Inbox Zero</title>
      <link>https://nanx.me/blog/post/my-ocd-for-inbox-zero/</link>
      <pubDate>Wed, 15 Aug 2018 21:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/my-ocd-for-inbox-zero/</guid>
      <description>Inbox zero means having zero unread emails in your email’s inbox. I have an OCD for it.&#xA;Photo: Fraser Valley, British Columbia, Canada.&#xA;Many years ago, like many people, I used to “mark as unread” some emails I received, when I cannot decide to reply or not reply immediately for whatever reasons.&#xA;Obviously, pretending things as unread is not an effective strategy to get them done. I didn’t reply to the things I want to say yes quickly enough, which could make people think that I’m not interested.</description>
    </item>
    <item>
      <title>John M. Chambers Award, Product Sense, and the Feature Roadmap for liftr</title>
      <link>https://nanx.me/blog/post/jmc-award/</link>
      <pubDate>Mon, 30 Jul 2018 23:30:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/jmc-award/</guid>
      <description>I feel super honored to say that I have received the 2018 John M. Chambers Statistical Software Award from the American Statistical Association this year, for my R package liftr on reproducible research. This year’s award also has another recipient: Dustin Tran, for his excellent Python library Edward on probabilistic programming. We just had a great session of invited talks today at the 2018 Joint Statistical Meetings in Vancouver, Canada.</description>
    </item>
    <item>
      <title>It Has Been 15 Years Since MSBlast</title>
      <link>https://nanx.me/blog/post/15-years-since-msblast/</link>
      <pubDate>Sun, 15 Jul 2018 00:20:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/15-years-since-msblast/</guid>
      <description>It was August 2003, when I was in the 8th grade, enjoying the summer break.&#xA;One day, my dad came home from work. He tried to call me during the day asking for help on some computer issues. Unfortunately, he couldn’t reach me because I was using the dial-up Internet with a good old 56k modem, so the landline was busy the whole time. (You’ll know what I mean if you’re old enough.</description>
    </item>
    <item>
      <title>Save the Link Like a Boss</title>
      <link>https://nanx.me/blog/post/save-the-link-like-a-boss/</link>
      <pubDate>Sun, 01 Jul 2018 17:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/save-the-link-like-a-boss/</guid>
      <description>Photo: Middle of Nowhere by David Kovalenko Anything posted on the Internet, stays there forever.&#xA;I’m a firm believer of such assertions. The reality is, however, even if something is published on the Internet, due to technical reasons, it still probably won’t live there forever. The situation becomes more like&#xA;If something isn’t on the web, it doesn’t exist at all.&#xA;Yes, as time goes, content on the Internet fades away.</description>
    </item>
    <item>
      <title>Learn to Say No The Hard Way</title>
      <link>https://nanx.me/blog/post/learn-to-say-no-the-hard-way/</link>
      <pubDate>Thu, 28 Jun 2018 16:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/learn-to-say-no-the-hard-way/</guid>
      <description>Photo by Esteban Lopez.&#xA;Sometimes I feel guilty that I have not been able to do some real impactful research during my PhD studies. Although, I feel blessed that I have super cool advisors, who have taught me things that are even more important than doing good research. One particular thing I learned, is about saying no – I was terrible at it, and honestly, still learning more about it.</description>
    </item>
    <item>
      <title>Shiny Now Supports Async Execution</title>
      <link>https://nanx.me/blog/post/shiny-async/</link>
      <pubDate>Mon, 21 May 2018 14:15:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/shiny-async/</guid>
      <description>Shiny is my favorite web application framework. It is simply awesome. Shiny 1.1.0 was released to CRAN last week. This update brings probably the most significant feature/improvement in recent years: async execution support. With the help of future, promises (computer science people surely knew how to name abstract things…), and this shiny update, you can now write scalable web applications using Shiny.&#xA;You Want It When? (Zootopia) In brief, if you have some long-running computations (such as querying a remote database, live fitting a statistical model) in your Shiny app, that computation would block additional users to use the app simultaneously, until that computation is finished.</description>
    </item>
    <item>
      <title>An HTTPS-Censored Future</title>
      <link>https://nanx.me/blog/post/https-censored-future/</link>
      <pubDate>Fri, 18 May 2018 15:50:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/https-censored-future/</guid>
      <description>The Fall of Phaeton by Peter Paul Rubens, c. 1604/1605. National Gallery of Art. The Good News One of the good news from the past weeks is that GitHub Pages finally supports HTTPS for custom domains. The feature that people waited forever eventually arrived. Although this is not too late, we have to admit, moving items out of “backlog” and “roadmap” and implement them can be a lengthy process.</description>
    </item>
    <item>
      <title>Taking the Long View</title>
      <link>https://nanx.me/blog/post/taking-the-long-view/</link>
      <pubDate>Wed, 02 May 2018 05:40:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/taking-the-long-view/</guid>
      <description>The world is a fast-changing place. Eleven years ago, when iPhone was first launched, people probably didn’t anticipate that was the end of Nokia. Today, I don’t even use the voice calling feature on my phone anymore, unless really necessary. This might not be good news for AT&amp;amp;T, and maybe I’m an outlier, but this is the truth, this is the world we live.&#xA;After walking a long road in such a changing world, it is easy to forget why we started at first.</description>
    </item>
    <item>
      <title>10 Things That Matter in Deep Learning (1/5)</title>
      <link>https://nanx.me/blog/post/10-things-matter-in-deep-learning-1/</link>
      <pubDate>Thu, 12 Apr 2018 17:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/10-things-matter-in-deep-learning-1/</guid>
      <description>Heart of the Matter by Otis Kaye, 1963. The Art Institute of Chicago. Admit it or not, neural networks (or more broadly, connectionism) are being revived to readdress almost all problems in the machine learning world. Before deep learning, there were a few much smaller hypes like matrix factorization, sparse learning, and kernel methods, but none of them is comparable to this one. Never before has a learning method been so blessed by capital, yet so cursed by it.</description>
    </item>
    <item>
      <title>The Return of the Native Font Stack</title>
      <link>https://nanx.me/blog/post/the-return-of-the-native-font-stack/</link>
      <pubDate>Tue, 13 Mar 2018 02:20:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/the-return-of-the-native-font-stack/</guid>
      <description>Photo: Lead type&#xA;As people said, web design is 95% typography. Once upon a time, people who care about the typography of their website define their font stack using CSS like this:&#xA;font-family: &amp;quot;Lucida Sans Unicode&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, sans-serif; They secretly wish their website could look different from the mortal websites which use Times New Roman, Arial, or Georgia with the funny-looking numerals.&#xA;Until one day, their sincerity impressed the god of typography, who granted them a technology named web fonts.</description>
    </item>
    <item>
      <title>3 Simple Criteria for Choosing Open Source Projects</title>
      <link>https://nanx.me/blog/post/choose-open-source-projects/</link>
      <pubDate>Mon, 12 Mar 2018 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/choose-open-source-projects/</guid>
      <description>As programming languages and their ecosystems evolve, we have many more powerful tools in our toolbox(es) than ten years ago. Ideas are also becoming cheaper than ever, especially when we want to implement them as open source projects. Everything looks like a nail when we have a mighty hammer. We may come up with five ideas in the morning every day. While at the end of the day, we may</description>
    </item>
    <item>
      <title>Nothing Without Love</title>
      <link>https://nanx.me/blog/post/nothing-without-love/</link>
      <pubDate>Thu, 15 Feb 2018 21:00:00 -0500</pubDate>
      <guid>https://nanx.me/blog/post/nothing-without-love/</guid>
      <description>Nate Ruess’s songs have magnificent voices and amazing arrangements, while often unbelievably sad at their cores, such as Grammy’s favourite “We Are Young”. This one, on the other hand, is an exception.&#xA;Send up a signal, that everything’s fine&#xA;Come on slide up right here by my side&#xA;You know that I, I want to rest in your light&#xA;Photo: Wind turbine near North Kingstown, RI, from the morning train to NYC.</description>
    </item>
    <item>
      <title>Buzzword Map, or Buzz World Map</title>
      <link>https://nanx.me/blog/post/buzzword-map-or-buzz-world-map/</link>
      <pubDate>Sat, 13 Jan 2018 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/buzzword-map-or-buzz-world-map/</guid>
      <description>I don’t always care about popular topics because they usually fade fast. But when I do, here is a 2017 world interest map for deep learning, artificial intelligence, and blockchain (courtesy of Google Trends, where you can reproduce it).&#xA;Figure: Google Trends — comparing the search traffic in 2017.&#xA;The dominant color shown in each region represents the most searched term there. The question is, what does this map tell us — everything, or nothing at all?</description>
    </item>
    <item>
      <title>Papers in My Heart (2017)</title>
      <link>https://nanx.me/blog/post/papers-in-my-heart-2017/</link>
      <pubDate>Sun, 31 Dec 2017 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/papers-in-my-heart-2017/</guid>
      <description>Figure: Album cover for Skip to the Good Part by He Is We, 2011. It is the last day of 2017. Looking back, it has been another fruitful year for statistical and machine intelligence research. Notably, a lot of new ideas have been published in the direction of deep learning. Although it is intriguing, I will probably talk about things I care about in deep learning in another post. Fingers crossed.</description>
    </item>
    <item>
      <title>Tanka: A Minimalist Theme for Hugo and Blogdown</title>
      <link>https://nanx.me/blog/post/hugo-tanka-theme/</link>
      <pubDate>Wed, 27 Dec 2017 07:00:00 -0500</pubDate>
      <guid>https://nanx.me/blog/post/hugo-tanka-theme/</guid>
      <description>I used to mention creating a purely R-based static website generator named Haiku with my then classmate Arjun about two years ago. I remember that he said the name was nice.&#xA;Time flies, and apparently, I did not have the chance to build it. Fortunately, Yihui saved the world again, and now blogdown has become the most elegant and powerful static website generator for R users, especially if you love R Markdown.</description>
    </item>
    <item>
      <title>Collected Wisdom</title>
      <link>https://nanx.me/blog/post/collected-wisdom/</link>
      <pubDate>Wed, 27 Dec 2017 03:00:00 -0500</pubDate>
      <guid>https://nanx.me/blog/post/collected-wisdom/</guid>
      <description>Here I will post some collected quotes that influenced my opinion on how learning, inference, and science should be. Choose problems One thing Grothendieck said was that one should never try to prove anything that is not almost obvious. This does not mean that one should not be ambitious in choosing things to work on. Rather, “if you don’t see that what you are</description>
    </item>
    <item>
      <title>Time Marches On</title>
      <link>https://nanx.me/blog/post/time-marches-on/</link>
      <pubDate>Tue, 26 Dec 2017 09:31:00 -0500</pubDate>
      <guid>https://nanx.me/blog/post/time-marches-on/</guid>
      <description>It’s a new start. Let’s have some fun.</description>
    </item>
    <item>
      <title>About</title>
      <link>https://nanx.me/about/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/about/</guid>
      <description>I&amp;rsquo;m a statistician working at the intersection of statistical methodology and research software engineering. My focus is on building software infrastructure that makes late-stage clinical development efficient and reliable. Previously, I was a statistician in Methodology Research, led by Keaven M. Anderson, at Merck &amp;amp; Co., Inc.&#xA;I served on the R Consortium Infrastructure Steering Committee from 2022 to 2026. I also contribute to the R Submissions Working Group, which pioneered the first successful open source R submission pilot to the FDA.</description>
    </item>
    <item>
      <title>Books</title>
      <link>https://nanx.me/books/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/books/</guid>
      <description>Bookdown and Quarto book projects Group Sequential Designs Made Easy: A Web Interface Handbook Learn how to use a web interface to design, explore, and optimize group sequential clinical trials leveraging the flexible capabilities of the R package gsDesign. Python for Clinical Study Reports and Submission Use Python for tables, listings, and figures generation and submission R for Clinical Study Reports and Submission Prepare tables, listings, and figures for clinical</description>
    </item>
    <item>
      <title>Colophon</title>
      <link>https://nanx.me/colophon/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/colophon/</guid>
      <description>I launched this website in 2009, initially as a personal blog, before later expanding it to include a professional portfolio. Throughout the years, I have explored different publishing platforms: from WordPress and OpenScholar to hand-written HTML. My journey led me to adopt the static website generator: blogdown, driven by Hugo.&#xA;This page lists the tools I use to build the site today. Besides the proprietary fonts, the entire stack is free and open source, and can be found on GitHub.</description>
    </item>
    <item>
      <title>Papers</title>
      <link>https://nanx.me/papers/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/papers/</guid>
      <description>Google Scholar ORCID ResearchGate Download BibTeX file 2024 Some Group Sequential Trials From Industry Over the Last 30 Years&#xA;Keaven M. Anderson, Yujie Zhao, Nan Xiao, Joy Ge, Harlan F. Weisman&#xA;Statistics in Biopharmaceutical Research 16(3): 281&amp;ndash;293, 2024&#xA;PDF (Accepted Manuscript) | SBR Best Papers Award 2025 2023 Electronic Common Technical Document Submission With Analysis Using R&#xA;Yujie Zhao, Nan Xiao, Keaven Anderson, Yilong Zhang&#xA;Clinical Trials 20(1): 89&amp;ndash;92, 2023 Building an Internal R Package for Statistical Analysis and Reporting in Clinical Trials: A SAS User&amp;rsquo;s Perspective</description>
    </item>
    <item>
      <title>Software</title>
      <link>https://nanx.me/software/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/software/</guid>
      <description>Python Packages R Packages Rust Packages VS Code Extensions JS Apps Shiny Apps Browser Extensions Machine Learning Workflows Open Source Contributions Awesome Lists Hugo Themes Fonts Python packages tinytopics GPU-accelerated topic modeling via sum-to-one constrained neural Poisson NMF PyPI | GitHub tinyvdiff Minimalist visual regression testing plugin for pytest PyPI | GitHub py-ggsci Scientific journal and sci-fi themed color palettes for plotnine PyPI | GitHub pytest-r-snapshot A pytest plugin for</description>
    </item>
    <item>
      <title>Talks</title>
      <link>https://nanx.me/talks/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://nanx.me/talks/</guid>
      <description>2025 Python for Clinical Study Reports and Submission&#xA;R/Pharma Conference (workshop)&#xA;Workshop slides 2022 Asynchronous Processing of Long-Running Tasks in Shiny&#xA;Nicole Jones, Nan Xiao, Shuqi Zhao, Lawrence A. Gould&#xA;R/Pharma Conference&#xA;Video recording R for Clinical Study Reports and Submission&#xA;Yilong Zhang, Nan Xiao, Keaven M. Anderson&#xA;2022 ASA Biopharmaceutical Section Regulatory-Industry Statistics Workshop&#xA;Short course slides Grammar of Group Sequential Design&#xA;Keaven M. Anderson, Yilong Zhang, Nan Xiao, Yujie Zhao</description>
    </item>
  </channel>
</rss>
