Sign in

Yihui Xie

@yihui.org
1.2K followers 20 following 91 posts

yihui.org

PostsRepliesMedia
Yihui Xie @yihui.org · 28/09/2026
Very cute! This reminds me of my useR! 2014 talk at UCLA, in which I also showed Gromit (as a "knitter") in the beginning :) github.com/yihui/knitr-...
010
Yihui Xie @yihui.org · 22/09/2026
Thanks! I'm aware of that, but I used gh-pages deliberately so I can check diffs between builds. The size hasn't bothered me yet since I rarely pull this branch. If it becomes a problem one day, I can force push and delete older commits.
000
Yihui Xie @yihui.org · 21/09/2026
Oh, his only open issue is about "out of office": github.com/ropensci/tar... which will be closed on Sept 30th! I'll try to close mine on 29th!!
030
Yihui Xie @yihui.org · 21/09/2026
After a massive cleanup of knitr issues/PRs in the past few days, I can finally stop being jealousy of Will Landau for his zero open Github issues in {targets}: yihui.org/en/2026/09/k... For the record, he has one open issue at the moment and so do I (debating with myself whether I should close it).
yihui.org
A Four-Day knitr Issue/PR Backlog Sprint - Yihui Xie | 谢益辉
After knitr v1.52 went to CRAN on 2026-09-06, I did something I don’t do often but have been hoping to do: I sat down and worked through the GitHub issue tracker more or less top to bottom. Over...
2252
Yihui Xie @yihui.org · 12/09/2026
Yes, you can use it in Quarto, R Markdown, Shiny, litedown, and Jupyter.
020
Yihui Xie @yihui.org · 11/09/2026
working on R Markdown and knitr in 2026... - yihui.org/en/2026/09/r... - yihui.org/en/2026/09/k...
yihui.org
A Review of **rmarkdown** Updates from 2024 to 2026 - Yihui Xie | 谢益辉
Back in 2022, I promised that R Markdown wouldn’t die. In this post, I’ll give a summary of notable updates in rmarkdown v2.26–v2.32 (2024–2026). For the full changelog, please...
2308
Yihui Xie @yihui.org · 07/09/2026
I'm very glad that the dev version of knitr helps! Actually the new version just landed on CRAN this morning :)
130
Yihui Xie @yihui.org · 06/09/2026
Oh I didn't know arf allows this. Just tried it and you are completely right---I'm able to go back to the beginning of the expression even if I'm on a continuation line. Thanks for the tip! Good job, @eitsupi.bsky.social! You've got a new sponsor on Github now :)
120
Yihui Xie @yihui.org · 06/09/2026
I battled with the dark side of me for days on whether I should support .Last.value in knitr/litedown. Some may feel relieved that the dark side didn't win.
131
Yihui Xie @yihui.org · 06/09/2026
That's very cool. By "Sweave/knitr inserts R output", I'm curious if you have some Typst magic (extension) to call Sweave/knitr inside Typst, or you are using the minimal .Rtyp support in knitr?
110
Yihui Xie @yihui.org · 06/09/2026
To clarify, all consoles/terminals do allow scrolling; problem is that when you're on the 2nd line: > data |> + f() # press up arrow from here and scroll up, it'd become: > data |> + data |> which won't work. There's no way to do "give me all previous lines and I wanna start over" in console
100
Yihui Xie @yihui.org · 05/09/2026
When I finished typing f() and realized I needed to assign this to a variable, I'd have to do: > data |> + f() -> x Or just run the code and then x = .Last.value
021
Yihui Xie @yihui.org · 05/09/2026
Most of time I also write code in editor instead of console. Sometimes I just type some quick code that's not meant to be saved so I type in the console. I wonder which console allows you to scroll up when you are in the middle of an expression? > data |> + f() # can't scroll up here anymore
320
Yihui Xie @yihui.org · 05/09/2026
I rarely use <- (sorry I'm a team "=" member), but I have used -> several times over the years when I typed some long multiline code in the R console and realized I needed to assign the whole thing to a variable, and it was too late to go back to the beginning to type x <- ... but ... -> x is handy.
170
Yihui Xie @yihui.org · 21/08/2026
Yes, that's very true.
010
Yihui Xie @yihui.org · 21/08/2026
BTW, I absolutely love tinytable (and also tinyplot). It contains a lot more effort (to be a universal table generator). I was lazy and took the easy path :)
010
Yihui Xie @yihui.org · 21/08/2026
Thanks a lot for your feedback! You can export {lt} tables to PDF and PNG via browser: pkg.yihui.org/lt/examples/... so PDF is supported, and it's just that PDF is not created from LaTeX but HTML instead, which makes my life much easier since I wouldn't need to reinvent the whole thing in LaTeX.
pkg.yihui.org
An Introduction to lt
230
Yihui Xie @yihui.org · 21/08/2026
I just came back from summer vacation, and would like to announce a tiny new R package I developed recently: {lt} yihui.org/en/2026/07/l...
yihui.org
The lt Package: Lightweight HTML Tables for R (and Beyond) - Yihui Xie | 谢益辉
Recently I have released a new package on CRAN: lt, short for lightweight tables (or less than). Its origin story is a small moment of shock. About two years ago a project required gt, so I ran &helli...
48023
Yihui Xie @yihui.org · 21/08/2026
Please help support Tomáš’s widow and young son. I was worried about them when I heard the sad news back in April, and I really appreciate that the R Foundation has set up this fund to help the family.
043
Yihui Xie @yihui.org · 21/05/2026
I just discovered TeX Live dropped support for Solaris from the automatic PR github.com/rstudio/tiny... today; with indescribable joy and uncertainty, I went to texlive-source repo and indeed I was not dreaming: github.com/TeX-Live/tex... as if they heard me in my post: yihui.org/en/2026/03/t...
github.com
remove (oracle) solaris binaries and builds · TeX-Live/texlive-source@0cdf2d8
git-svn-id: svn://tug.org/texlive/trunk/Build/source@78957 c570f23f-e606-0410-a88d-b1316a301751
071
Yihui Xie @yihui.org · 18/05/2026
I've used testit quietly for testing R packages for ~13 years until John Blischak offered a few usability suggestions recently, which made me believe this tiny package is worth a v1.0 release. If you appreciate minimalism like me, you may enjoy life minus 22 dependencies: yihui.org/en/2026/05/t...
yihui.org
Converting testthat Tests to testit - Yihui Xie | 谢益辉
Back in 2013, I wrote about testing R packages when I first released testit. Thirteen years later, I still believe that unit testing should be nothing more than “tell me if something unexpected …
072
Yihui Xie @yihui.org · 09/05/2026
In the past I used to wait for the automatic hourly sync/update/build, which gave me chances to leave my computer until the new build is ready on r-universe. Now I no longer have excuses!!
171
Yihui Xie @yihui.org · 09/05/2026
I don't know why I just realized what the refresh button on r-universe.dev means and clicked it for the first time. I had wished for this for years, and it may have existed for years but I just didn't know it was triggering new builds! One of many reasons @jeroenooms.bsky.social is our hero ninja!
Check for package updates on r-universe
2251
Yihui Xie @yihui.org · 09/05/2026
I don't have much experience myself (only briefly tried some Ollama models on my iMac a couple of months ago and they were terrible but I imagine it was because I tried low-end models). I've heard good words about frame.work computers, and Gemma 4 models may be worth trying.
000
Yihui Xie @yihui.org · 05/05/2026
One thing I still remember about AT&T Labs was that the building was a maze. It took me a long time to be able to navigate through. Perhaps it was deliberately designed for those top smart people :)
040
Yihui Xie @yihui.org · 05/05/2026
Oh, S, John Chambers, and Rick Becker... When I did internship at AT&T Labs in 2012, Rick's office was next to mine. It was fun talking to him from time to time and showing him my new toy for interactive graphics (cranvas). Happy birthday, S! Thanks to these pioneers!
1221
Yihui Xie @yihui.org · 05/05/2026
Looks like this will never change: yihui.org/en/2017/12/s... & yihui.org/en/2018/02/c... For our mental health, we should leave SO behind, and tell users to ask questions elsewhere. One former SO employee told me they had discussed my complaints in my posts back then, but I've never seen a change.
130
Yihui Xie @yihui.org · 04/05/2026
I just voted to undelete and it's back now; still closed and I also voted to re-open. This is the most frustrating thing about StackOverflow. Unfortunately there's nothing more we can do about it...
150
Yihui Xie @yihui.org · 04/05/2026
I've finally finished my writing, and am looking forward to yours!
000
Yihui Xie @yihui.org · 30/04/2026
Good question, and the answer is, unfortunately, no. For some reason, Microsoft decided to make `curl` an alias of `Invoke-WebRequest`, which is exactly the stupid cmdlet that wasted my time and hence I wanted to avoid.
010
Yihui Xie @yihui.org · 30/04/2026
Look at the stupid power(less)shell code: github.com/rstudio/tiny...
github.com
forget it; let's just use curl.exe · rstudio/tinytex@70c3cb7
curl.exe ships with Windows 10 1803+ (April 2018) and Windows Server 2019+; anyone running a supported version of Windows should have it
120
Yihui Xie @yihui.org · 30/04/2026
I didn't know until today that curl.exe has been available on Windows for 8 years. Sigh. How much of my life has been wasted in fighting with those stupid download methods in .bat and power(???)shell scripts over these years! Anyway, TinyTeX users on Windows can enjoy a faster installation now.
1261
Yihui Xie @yihui.org · 28/04/2026
A new document format .Rtyp in knitr for Typst output: yihui.org/en/2026/04/k... (I also wrote down my thoughts on Typst since people keep asking me; I stand firmly on the HTML path but I'll be happy to continue supporting Typst and LaTeX, even though I don't use them myself)
yihui.org
Preliminary Support for Typst in knitr - Yihui Xie | 谢益辉
A few weeks ago I added preliminary support for Typst to knitr. The way it works is simple: if your file has the extension .Rtyp, knitr will recognize it as a Typst document, knit it, and produce a &h...
0111
Yihui Xie @yihui.org · 27/04/2026
Yes, I think so. I guess PNG is more widely known than WebP, though. BTW, WebP just gained support in knitr a few days ago: github.com/yihui/knitr/...
github.com
Support agg_webp() using ragg >=1.5.0 by heavywatal · Pull Request #2434 · yihui/knitr
WebP output has been supported by ragg since version 1.5.0. This PR enables knitr::opts_chunk$set(dev = "ragg_webp") for using it with knitr.
011
Yihui Xie @yihui.org · 27/04/2026
Oh yes, I simply cloned the repo and ran `R CMD build` on it. Didn't know that the CRAN version excluded vignettes (wise decision!).
010
Yihui Xie @yihui.org · 27/04/2026
I just ran `Rscript -e 'tinyimg::tinypng("tinyplot")'` and got this (the tarball size only decreased from 2.5M to 2.4M, though):
altdoc/favicon.png | 24.8 KB -> 21.0 KB (-15.1%)
altdoc/logo.png | 42.8 KB -> 34.1 KB (-20.5%)
inst/Psychoco2026/banner.png | 39.2 KB -> 30.5 KB (-22.0%)
man/figures/README-quickstart_theme-1.png | 98.6 KB -> 76.0 KB (-22.9%)
man/figures/README-quickstart2-1.png | 110.7 KB -> 84.2 KB (-24.0%)
man/figures/README-quickstart3-1.png | 93.9 KB -> 73.9 KB (-21.3%)
man/figures/README-quickstart4-1.png | 111.0 KB -> 93.6 KB (-15.7%)
man/figures/README-quickstart5-1.png | 131.6 KB -> 105.9 KB (-19.5%)
vignettes/useR2025/img/background.png | 44.5 KB -> 38.7 KB (-13.1%)
vignettes/useR2025/img/briggs.png | 998.5 KB -> 798.7 KB (-20.0%)
vignettes/useR2025/img/karolis.png | 279.1 KB -> 137.0 KB (-50.9%)
vignettes/useR2025/img/poisonalien.png | 903.7 KB -> 556.0 KB (-38.5%)
vignettes/useR2025/img/rgraphics.png | 122.9 KB -> 32.5 KB (-73.6%)
vignettes/useR2025/img/rgraphics2.png | 122.9 KB -> 36.8 KB (-70.0%)
vignettes/useR2025/img/wolfgang1.png | 463.5 KB -> 222.9 KB (-51.9%)
vignettes/useR2025/img/wolfgang2.png | 400.7 KB -> 216.2 KB (-46.0%)
120
Yihui Xie @yihui.org · 26/04/2026
Yes, that's unfortunate, although I understand their point. For me, I ruthlessly trimmed every bit off of these crates (e.g. CI config files, docs, etc), e.g., for tinyimg itself, I was able to trim 5MB from the raw 31MB crates and the vendored .xz is about 2.1MB: github.com/yihui/tinyim...
github.com
010
Yihui Xie @yihui.org · 26/04/2026
The size of all tarballs is about 16Gb. To make a meaningful comparison, I need to optimize PNGs in-place and rebuild the tarballs, which I didn't do (re-running R CMD build with vignettes can be tricky since I may need to install system deps). I guess PNGs should have low compression ratio, though.
github.com
100
Yihui Xie @yihui.org · 26/04/2026
That 12Mb hex sticker is the winner (the single largest PNG among all R packages on CRAN). With enough memory, it can be optimized to a few hundred Kb (lossless).
141
Yihui Xie @yihui.org · 26/04/2026
All CRAN source packages (22749 tarballs as of today) contain 5.8Gb PNG images in total. Lossless compression via tinyimg::tinyping() can save 1.9Gb (32.0% savings), and lossy compression without noticeable differences can save 2.8Gb (48.2%): pkg.yihui.org/tinyimg/exam... (plot on the page is slow)
pkg.yihui.org
PNG Savings in CRAN Packages
3386
Yihui Xie @yihui.org · 24/04/2026
PSA: The new standard for "lightweight" packages is that the package should be smaller than most hex sticker PNGs: yihui.org/en/2026/02/b...
yihui.org
Bye, Hex Stickers - Yihui Xie | 谢益辉
As one small sign of moving towards minimalism, I decided not to make a hex sticker for the litedown package when I started writing it in 2024. To be precise, I didn&rsquo;t want to make a sticker &he...
030
Yihui Xie @yihui.org · 24/04/2026
Out of curiosity, I wondered how much we can reduce the size of all PNGs in all CRAN packages via tinyimg. Interestingly, I ran out of memory (on GHA) in one package and it turned out it has a 12Mb hex sticker: github.com/cran/estar/b... 12M is more than enough for 2 base Alpine Linux Docker images!
github.com
1141
Yihui Xie @yihui.org · 24/04/2026
Thank you! That's awesome! Have you already applied this trick to r-universe (wasm) packages?
100
Yihui Xie @yihui.org · 20/04/2026
I find it interesting and a little surprising that (occasionally) people still use github.com/yihui/latex-... to figure out missing LaTeX packages: yihui.org/en/2021/06/l... Obviously TinyTeX still hasn't won the world, which sounds like a major bug that I'm unable to fix. github.com/rstudio/tiny...
github.com
GitHub - yihui/latex-pass: Help you pass the LaTeX compilation by telling you which LaTeX packages are missing to compile your documents
Help you pass the LaTeX compilation by telling you which LaTeX packages are missing to compile your documents - yihui/latex-pass
1102
Yihui Xie @yihui.org · 20/04/2026
12 years ago I created crandalf at github.com/yihui/crandalf to check reverse dependencies of R packages on Travis CI and switched to GHA later. If your pkg has < 400 revdeps, you can do a simple edit in a .yaml file and submit a PR to let GHA do the hard work. More info: yihui.org/en/2021/06/c...
github.com
GitHub - yihui/crandalf: Check all reverse dependencies of your R package with Github Actions
Check all reverse dependencies of your R package with Github Actions - yihui/crandalf
0121
Yihui Xie @yihui.org · 16/04/2026
You are welcome! If AI were this good in 2024, commonmark wouldn't have been a dep :) I'd certainly choose to torture AI with the C library directly, and litedown would have been 10x faster. Now I no longer have much time for this, unfortunately, but I'm quite happy with this fully handcrafted pkg.
010
Yihui Xie @yihui.org · 16/04/2026
Of course, it has existed since 2024: yihui.org/litedown/#se... See Figure 1 in the documentation to know more about the scope of litedown.
yihui.org
litedown: R Markdown Reimagined
000
Yihui Xie @yihui.org · 16/04/2026
Thanks! It shouldn't be hard to generalize this idea to all litedown-generated pages, i.e., you can edit R code chunks on HTML pages and run them in browser. That was one of the most important reasons why I went the "lite" way without looking back.
000
Yihui Xie @yihui.org · 15/04/2026
In case you aren't aware, TinyTeX has started offering binaries for ARM and musl-based Linux since last month: yihui.org/en/2026/03/t... Enjoy the extra 5 minutes saved! BTW, I didn't know musl/Alpine Linux before. While working on TinyTeX binary for it, I was intrigued and also quite impressed.
yihui.org
Announcing TinyTeX Binaries for arm64 and musl-based Linux - Yihui Xie | 谢益辉
Three years ago, Cole Arendt requested pre-built TinyTeX binaries for ARM Linux. Today, I&rsquo;m happy to announce that we now provide pre-built TinyTeX binaries for arm64 and musl-based Linux (e.g. ...
072
Yihui Xie @yihui.org · 15/04/2026
Alternatively you can use the shell script to install it (which I'd recommend because the script is always up-to-date and not subject to the R package tinytex): yihui.org/tinytex/#ins... 2/2
yihui.org
TinyTeX - Yihui Xie | 谢益辉
TinyTeX is a custom LaTeX distribution based on TeX Live that is small in size, but functions well in most cases, especially for R users. If you run into the problem of missing LaTeX packages, it &hel...
010