Yihui Xie

Yihui's Blog

R · statistics · life · random thoughts


2022-01-05 News from knitr v1.35 to v1.37: Alternative Syntax for Chunk Options, and Some New Engines


2021-11-12 blogdown v1.6: Support for the config/ Directory, and Improvements in install_hugo()/new_post()

2021-10-28 Turn an Ordered List on an HTML Page into a Collapsible FAQ List

2021-10-19 An Upcoming Breaking Change in knitr on Unbalanced Chunk Delimiters

2021-06-15 One Little Thing: Spin a Child Script via knitr::spin_child()

2021-06-09 Simulating the OLS Consistency When X and ε are Dependent

2021-06-03 Full-width Figures with Two Lines of CSS

2021-06-03 Let Your Markdown Breathe!

2021-06-03 News from formatR v1.9 to v1.11

2021-06-03 One Little Thing: The Docco Style with knitr::rocco()

2021-06-03 crandalf: Use Github Actions to Check Reverse Dependencies of an R Package

2021-06-02 Don't Know Which LaTeX Package(s) to Install When Getting a LaTeX Error?

2021-06-01 Self-contained xaringan Slides

2021-05-30 blogdown: Knit on Save, or Save on Knit?

2021-05-28 One Little Thing: Reusing Code Chunks and Chunk Options with knitr

2021-04-27 Best Wishes for Your Retirement, John!

2021-03-31 Random Thoughts (Episode 1)

2021-03-22 A List of Mistakes that I Have Made in My Software Engineering Career

2021-03-21 What Does it Mean When Your Github Issue is Closed, and What Can You Do?


2020-04-15 Accidentally Pressing 'm' on xaringan Slides

2020-02-25 Quick Notes on Some rstudio::conf(2020) Talks after I Watched the Videos

2020-02-24 My First Uncoast Unconference in 2019

2020-02-17 Is that a Mickey Mouse Blowing a Trumpet?

2020-02-12 Down? Not My Fault...

2020-02-11 On a Clear Night

2020-02-06 Back from rstudio::conf(2020)


2019-07-16 Romain Lesur: The Most Wonderful Collaborator I Have Ever Worked With

2019-06-28 On TIOBE Index

2019-05-22 From RTFM to ITFM (Improve The Fine Manual)

2019-05-01 August 12, 1991 Review of S-PLUS Statistical Software

2019-04-30 Naming Software Packages with Common Words

2019-03-06 The Implementation of `yolo = TRUE` in xaringan via yolofy()

2019-02-20 The Ultimate Infinite Moon Reader for xaringan Slides

2019-01-25 Back from rstudio::conf 2019


2018-12-26 On Marketing (on Social Media)

2018-12-24 On Disagreement

2018-11-29 Two Roads Diverged in a Wood; Take One without Blocking the Other

2018-11-21 Isn't Medium an Obviously Terrible Platform for Blogging?

2018-11-09 My Biggest Regret in the knitr Package

2018-11-09 On Cosmetic Changes in Pull Requests

2018-11-09 Some of My JS Tricks to Enhance the HTML Output of Markdown

2018-11-08 The Two Surprisingly Hard Things about the Otherwise Simple Markdown

2018-11-08 Things are Getting Better and Better

2018-11-07 Winners Take All in the Dependency World (or Hell)

2018-11-02 English is Still Hard for Me, and Thoughts on (Computer) Language Wars

2018-10-19 Rmd Files will No Longer be Rendered as Markdown on Github

2018-09-21 A Follow-Up Post on My Early Career Crisis Post (Finally)

2018-09-20 My Trick of Deciding if a Link Should Open a New Browser Tab

2018-09-18 How to Put All Your Code in the Appendix in R Markdown

2018-09-18 Serving a Website or Shiny App at

2018-09-10 The First Notebook War

2018-09-04 xfun::pkg_attach(): A Vectorized Version of library()

2018-08-31 Using TinyTeX from a Flash Drive

2018-08-29 Impact: Depth or Breadth?

2018-08-16 Create GIFs with gifski in knitr Documents

2018-08-09 makeActiveBinding(): The Most Magical Hidden Gem in Base R

2018-08-08 Double Negatives

2018-08-07 Reflections on 25+ Years of "50 Years of Data Science"

2018-08-06 Write a Book with bookdown and Publish with Chapman & Hall

2018-07-31 Two of My Use Cases of Lazy Evaluation

2018-07-30 In HTML and the Web I Trust

2018-07-30 Solving Statistical Computing Problems with SQL

2018-07-30 The Cool Hacker Emi Tanaka

2018-07-27 Help Needed: Add More Tests in My R Packages

2018-07-27 On source("https://bioconductor.org/biocLite.R")

2018-07-27 Quietly Struggling (with Software)

2018-07-27 The First Bookdown Contest

2018-07-24 Slowly but Steadily, They Started to Help Me Answer Questions

2018-07-22 The Best Way to Support LaTeX Math in Markdown with MathJax

2018-07-17 How Will an Animated GIF Work in a Textbook?

2018-07-17 The "Invisible Baby" Metaphor

2018-07-14 No Description, Website, or Topics Provided

2018-07-13 R Markdown: The Definitive Guide

2018-07-13 The User-Developer Spectrum in the R Ecosystem

2018-07-11 Do You Have to Use FontAwesome or Other Libraries for Web Symbols?

2018-07-11 One Little Thing: Embed a File in the HTML Output of R Markdown

2018-07-11 Write / Don't Write the Whole Book in bookdown

2018-07-11 Yue Jiang: A Ninja with Sharingan

2018-07-10 Only One Person Can Help You with That

2018-07-06 Once in a Blue Moon, I Reached "Issue Zero" in a Github Repo

2018-07-03 On "Quick Questions"

2018-07-01 A CRANextra Repository for Homebrew and R Users on macOS

2018-06-22 Ideally, I Hope to Simply Copy and Run Your Example

2018-06-22 On Cache Invalidation

2018-06-19 HTML Widgets for Non-HTML Output Formats

2018-06-18 One Little Thing: knitr::combine_words()

2018-06-16 One Little Thing: Quote a Poem with blogdown

2018-06-16 One Little Thing: Touch a Source File in a blogdown Website

2018-06-14 Build Binary R Packages for the Homebrew Version of R?

2018-06-13 Okay, it is Time to Try Pandoc 2.x Now

2018-06-12 The Best Experience in Remote Talks that I Have Given

2018-06-12 The xaringan Math Limerick

2018-06-04 Pour Positive Energy into Github Issues

2018-05-25 One (Perhaps Surprising) Reason Why I may Silently Ignore a Github Issue

2018-05-07 No Slap in the Face to Those Who are Smiling

2018-05-02 Make the Right / Positive Things Easier to Do than Wrong / Negative Things

2018-04-06 The Trouble of .Rprofile if it Doesn't Have a Trailing Newline

2018-03-26 Timezones, and Worse, Daylight Saving Time

2018-03-23 On Adjectives

2018-03-20 Let MiKTeX Install Missing LaTeX Packages Automatically

2018-03-20 The "Talk-Driven Development" Model

2018-03-15 Don't Use Spaces or Underscores in File Paths; Use Dashes Instead

2018-03-12 Miao YU is Looking for a Postdoc Position in the US

2018-03-07 The Second Pull Request Could be (Much) Better

2018-03-06 Hacking the R (HTML) Help Pages

2018-03-06 The R Markdown Source Documents of My Presentations

2018-03-05 Thanks, Eduardo Junior, for Giving Up your Pull Request

2018-03-05 The Video of My Talk on blogdown at rstudio::conf 2018

2018-02-27 "Bite-sized" Pull Requests

2018-02-27 And They Closed a Valid Question on Stack Overflow Again

2018-02-27 The TAMU Theme for xaringan

2018-02-23 Netlify is Hiring Its First Data Scientist

2018-02-23 Thanks, Alicia Schep, for Digging into knitr Engines

2018-02-21 And They Started to Share Procrastination Techniques

2018-02-21 The #1 Question to Ask Yourself when Designing a Questionnaire

2018-02-19 A Twist of Hygge in xaringan

2018-02-16 My Early Career Crisis (2014 - 2015)

2018-02-15 Another R-Podcast with Eric Nantz

2018-02-14 Looking for a New Maintainer of the tikzDevice Package

2018-02-07 Perhaps My Documentation is not Too Bad

2018-02-06 All Hidden Features will Eventually be Discovered

2018-02-06 Thanks, Marie Dussault, for Reading the Full blogdown Book

2018-02-03 What is More Convincing than a CV?

2018-02-02 How to Pretend Typing Super Fast in RStudio

2018-01-31 The Large Variance in the Attention Level of Readers

2018-01-30 Anything that Can Look Like Cats will Look Like Cats

2018-01-30 How to Properly Write a URL

2018-01-30 Ian Lyttle is the Most Serious Conference Attendee I've Met

2018-01-30 It is Hard to Imagine the Limit of Bureaucracy

2018-01-26 Install RGtk2 From Source on macOS

2018-01-19 Back To The DT Package After Two Years

2018-01-17 Nothing Feels Better Than Someone Else Answering Questions For You

2018-01-16 Screenshots Can Be Helpful, But Only Text Can Be Copied And Executed

2018-01-02 stop() / return() Early for Shorter Code


2017-12-30 I Don't Always Offer Bounties on Stack Overflow. When I Do...

2017-12-29 Help Needed: Use Sentence Styles in knitr's Documentation

2017-12-27 library(methods): Human Time vs Computer Time

2017-12-21 Add An on.exit() Call to A Parent Function

2017-12-21 Someone Should Help Prof Alice Silverberg Set Up A Blog

2017-12-20 Being Busy vs Being Productive

2017-12-19 Another Year, Another R Package, Another Book, and Endless Joy

2017-12-16 How To Stop Sexual Harassment Or Other Misconduct At Conferences

2017-12-16 The Most Unexpected Discovery of An R Language Feature

2017-12-15 More Than "Last 13 lines of output" in R CMD check?

2017-12-13 One Little Thing To Consider When Naming Things (Software)

2017-12-12 save() vs saveRDS()

2017-12-09 How I Learned R

2017-12-08 The Spreadsheet Lady

2017-12-07 Embed A Live Video of Yourself Through Your Camera in HTML5 Slides

2017-12-07 How Twitter Shaped Us

2017-12-07 Reproducible Research With A Marmot

2017-12-07 Why Are Some Good Old Ideas Buried in the History of Statistical Graphics?

2017-12-05 A Desiccated baseR-er's Snowflakes via Base R Graphics

2017-12-04 Please Help Me Test TinyTeX: A Lightweight LaTeX Distribution

2017-12-04 The #1 Reason Why I Don't Want to Work in Academia

2017-11-22 Generate A Verbatim Code Chunk or Inline R Expression in knitr Output

2017-11-22 One Little Thing: the knitr Chunk Option include=FALSE

2017-11-22 Study the Hugo-XMin Theme If You Wish to Customize A blogdown Website

2017-11-22 Thanks, Elio Campitelli, for Testing My Guess!

2017-11-21 Ask Only (?) 12 Questions to Fix An Issue

2017-11-21 Thanks, Sergio Oller, for Closing Your Own Pull Request!

2017-11-20 Thanks, TJ Mahr, for Reading the Pandoc Documentation!

2017-11-19 301 Redirect: The Most Important Technique in Maintaining Websites

2017-11-16 On Saying No

2017-11-16 One Step Ahead

2017-11-15 No Need to Upgrade to Pandoc 2.0 (Yet)

2017-11-02 x[matrix(ncol = 2)]

2017-11-01 Thanks, Rebecca Condit, for Proofreading the blogdown Manuscript!

2017-10-25 Buy the Case and Return the Pearl

2017-10-24 I'm Also A Desiccated baseR-er Like Karl Broman

2017-10-23 R Package Vignettes: One Fundamental Contribution of Duncan Murdoch

2017-10-21 Thanks, Claus Ekstrøm, for Watching My Github Repo!

2017-10-19 A Few Joyful Moments of A Software Developer

2017-10-19 Schedule R Code to Be Executed Periodically in the Current R Session

2017-10-19 The 501st Reminder About Reproducible Examples

2017-10-13 "I thought it was obvious to you," he said. "No."

2017-10-13 Are These Still The R Manuals I Knew?!

2017-10-13 The blogdown Logo

2017-10-10 Thanks, Karl, for Cross-referencing on Github!

2017-10-09 Emoji Stats of Github Issues?

2017-10-09 Thanks, Jean-Olivier Irisson, for Mentioning Cross-posting!

2017-10-04 Different Degrees of Freedom for Bloggers and Book Authors

2017-10-03 Help Me: xaringan / remark.js CSS Themes?

2017-10-03 The Downside of Sharing A Personal Favorite

2017-09-29 Thanks, Max, for Not Emailing or Messaging Me!

2017-09-19 One Little Thing: knitr::fig_chunk()

2017-09-18 The Minimal Reproducible Example Paradox

2017-09-15 One Little Thing: knitr::imgur_upload()

2017-09-15 Pull Requests as A Teaching Tool

2017-09-12 Some Articles on Time Management

2017-09-11 Python: The Incredibly Confusing Language?

2017-09-11 Redundancy in "if (x == TRUE)"

2017-09-11 The bookdown Book in Retrospect

2017-09-06 Getting Rid of the .DS_Store Crap

2017-09-04 Am(az|us)ingly Arrogant

2017-08-31 Incremental Slides with xaringan / remark.js

2017-08-31 Twitter Threads vs Blogging

2017-08-31 We Cannot Be Friends If You Share Source Code As Screenshots

2017-08-29 Why xaringan / remark.js for HTML5 Presentations?

2017-08-24 Stack Overflow (or RStudio Community) First, Github Issues Second, and Emails Last

2017-08-22 Generate A Summary for A Post in Hugo

2017-08-22 Jump-start A Pull Request

2017-07-12 Number of Lines of Code

2017-07-06 On Syntax Highlighting

2017-07-03 How Was the JSM Attendees Data Leaked?

2017-06-09 On Formality

2017-06-08 The Ghost Printer Behind Top-level R Expressions

2017-06-07 Consider Netlify instead of GitHub Pages for Your Static Websites

2017-06-06 Rediscovering Rd2roxygen

2017-05-22 Finally, Four Backticks on Github

2017-05-19 A Note on on.exit()

2017-05-18 How I Find, Manage, and Use GIFs

2017-05-17 When in Doubt, Try to Upgrade Your Software Packages

2017-05-16 A Note on missing()

2017-04-14 Some Facts about Jeff Leek


2014-11-18 A Letter of Recommendation for Nan Xiao

2014-07-26 A Few Notes on UseR! 2014

2014-07-26 library() vs require() in R


2013-10-19 Markdown or LaTeX?

2013-09-30 Testing R Packages

2013-09-05 After Three Months I Cannot Reproduce My Own Book

2013-07-21 My first Bioconductor conference (2013)

2013-06-27 R Package Versioning

2013-06-10 You Do Not Need to Tell Me I Have A Typo in My Documentation

2013-06-03 A Few Tips for Writing an R Book

2013-04-12 Travis CI for R! (not yet)

2013-04-07 Travis CI for R?

2013-03-14 On ENAR, or Statistical Meetings in General

2013-02-17 Contribute to The R Journal with LyX/knitr

2013-02-10 Publishing from R+knitr to WordPress

2013-01-26 Code Pollution With Command Prompts

2013-01-05 Find Out Available Usernames with R


2012-12-10 ICERM Reproducibility Workshop: Day 1

2012-11-23 IPython vs knitr, or Python vs R

2012-10-30 Can We Live Without Backslashes?

2012-10-29 Build Static HTML Help Pages for R Packages

2012-10-29 Visiting FHCRC, JHSPH and Meeting Xi'an

2012-10-03 A Quick Note On Large 2D Data

2012-09-10 R Package Vignettes with Markdown

2012-08-07 For the Stupid Password Rules at Iowa State

2012-06-25 Making Reproducible Research Enjoyable

2012-05-08 Learn formatR in Two Minutes

2012-05-01 How to Make HTML5 Slides with knitr

2012-04-22 Fancy HTML5 Slides with knitr and pandoc

2012-03-15 Ideas on A Really Fast Statistics Journal


2011-12-12 How to Become an Efficient and Collaborative R Programmer

2011-12-01 knitr: Elegant, flexible and fast dynamic report generation with R

2011-08-16 The fun Package: Use R for Fun!

2011-05-25 Sweave and pgfSweave in LyX 2.0.x (experimental)

2011-04-30 Produce Authentic Math Formulas in R Graphics

2011-04-09 New versions of GGobi and rggobi for Windows users

2011-01-06 formatR update (0.1-6)

2011-01-04 Customizing the Theme of Your R HTML Help

2011-01-01 Happy New Year with R (2011, Fireworks!)


2010-12-22 A Special Graphics Device in R: the Null Device

2010-12-03 formatR update (0.1-5)

2010-12-01 Rd2roxygen: Convert Rd to roxygen documentation

2010-10-30 How to Start Using (pgf)Sweave in LyX in One Minute

2010-10-24 Grabbing Tables in Webpages Using the XML Package

2010-10-17 On the Gory Loops in R

2010-09-28 A Slider to Control Two Plotting Windows

2010-09-11 SyntaxHighlighter Brush for the R Language

2010-08-22 Numbered Figure/Table Captions in beamer

2010-08-14 Auto-completion in Notepad++ for R Script

2010-07-21 My Talk on Animations at useR! 2010 (NIST, Gaithersburg)

2010-04-17 alphahull: an R Package for Alpha-Convex Hull

2010-04-15 R is an Epic Fail?

2010-04-13 formatR: farewell to ugly R code

2010-04-05 Rules of Thumb to Meet R Gurus in the Help List

2010-04-03 Demonstrating the Power of F Test with gWidgets

2010-03-28 Looking for Software Paths in Windows Registry

2010-03-24 A Demo for the Ratio Estimation in Sampling Survey (Animation)

2010-03-24 Font Families for the R PDF Device

2010-03-23 R Tips in Stat 511

2010-03-12 Guess the Random Seed

2010-02-18 Press Enter in LyX Sweave as You Wish


2009-12-31 Happy New Year with R

2009-12-24 Merry Christmas Using R

2009-11-11 Create Animations in PDF Documents Using R

2009-10-19 swfDevice, RGoogleTrends, FlashMXML, and SVGAnnotation

2009-10-10 50000 Revisions Committed to R

2009-09-26 How to Import MS Excel Data into R

2009-08-31 Formatting Decimals in Texts with R

2009-08-29 Counterintuitive Results in Flipping Coins

2009-06-12 Simulation of Burning Fire in R

2009-06-10 Creating Tag Cloud Using R and Flash / JavaScript (SWFObject)

2009-06-04 Insert Google Adsense Code in bbPress Forum

2009-05-30 Convert MySQL Database to UTF-8 in Wordpress

2009-03-31 Enhanced tidy.source() (Preserve Some Comments)

2009-03-16 Identify Data Points in Off-Screen R Graphics Devices

2009-01-07 When Bell-shaped is Far Far Away from Gaussian


2008-11-05 Brownian Motion Using Google Visualization API and R

2008-10-20 Quincunx (Galton box, Bean machine) in R

2008-10-15 Dynamically Selecting Points Using R

2008-10-12 How to Open a File from a Hyperlink

2008-09-23 Eyeball Test to Identify An Unfair Coin (or A False Record)

2008-09-18 To Observe Interactions in Bubble Plots

2008-09-06 To See A Circle in A Pile of Sand

2008-08-14 Statistical Animations Using R - A Talk at useR! 2008

2008-07-21 Never Lonely

2008-07-07 Girls / Women are Talkative?

2008-06-20 Set framerate in pdf2swf

2008-06-15 Dirt in the Mouse & Glivenko-Cantelli Theorem

2008-06-13 Flash Animations by saveSWF() in Package animation

2008-06-04 Dokuwiki Plugins animation and math Added

2008-05-31 AniWiki: Animations in Statistics

2008-05-13 Handbook of Computational Statistics

2008-05-11 Random Number Generation on the Glasses (A Natural RNG)

2008-05-09 To See A World In A Range of Function

2008-05-02 On Scientific Writing

2008-04-28 How Did I Notice the Notice from Hadley Wickham

2008-04-26 Animations for Spatial Patterns (simulation only!)

2008-04-26 Finding Splitting Values for A Regression Tree

2008-01-20 Going Home

2008-01-17 R Doc: Using R for Data Analysis and Graphics

2008-01-11 Structural Equation Modeling: Where Are Advantages?

2008-01-09 Obligation for Statistics to Draw Conclusions?

2008-01-01 A Cartoonizer Web Site

2008-01-01 At the Beginning of the Year 2008


2007-12-31 Line Breaks for LaTeX Code in R Documentation Files

2007-12-29 Be Careful with the Value Returned in R Functions

2007-12-28 When Does Statistics Become Meaningless?

2007-12-27 Listening is A Better Way to Improve Pronunciation

2007-12-26 On Christmas Eve...

2007-12-24 Availability of the PNG Device in R

2007-12-22 Make Optical Illusions in R Graphics System

2007-12-20 Terrible Functional Data Analysis?

2007-12-17 Updating the Web Site Animated Statistics Using R

2007-12-03 Funny Mark Twain

2007-11-21 Quick Notes for VI Editor

2007-11-12 Package animation: Statistical Animations in R

2007-11-08 Statistical Modelling: Fitting Models or Fitting Data?

2007-10-29 Machine Learning: Machine is Learning Like a Human Being

2007-10-25 Animations in Survey Sampling

2007-10-19 Slight Changes to Boadilla Theme in Beamer Class

2007-10-08 Linux Font Equivalents for Verdana, Courier New & Georgia

2007-10-05 Spring in Fall

2007-10-04 Jokes in Statistics - A Talk to be Given in CUEB (Slides & Materials)

2007-10-03 multicol -- Multi-column Pages in LaTeX

2007-10-02 Demonstration of Confidence Intervals Using R (Animated)

2007-09-23 All Models are Wrong, and Some Models are Useless

2007-09-14 Semi-transparent Colors in R: Color Image as an Example

2007-09-11 R Language Definition File for Highlight

2007-09-08 A Lovely Donkey :-D

2007-09-08 Draw A Map of China onto A Color Image

2007-09-06 Process of Minimization by Gradient Descent (2D)

2007-08-25 Dare be defeated?

2007-08-12 Tidy up your R code