Do you love the multi-line progress bar when knitting a document? You probably don’t. Neither do I. It’s too verbose and clutters the console with too much information that often has too little real benefit. The information is intended for debugging, but as a debugging champion, you only need to know the error message, right? Why should knitr let you know the information from a hundred other code chunks when the error comes from only one chunk? Worse still, as a programming champion, you never run into errors and always watch the progress bar go from 0% to 100% with a vacant look on your face:
processing file: skeleton.Rmd
|... | 4%
inline R code fragments
|...... | 9%
label: setup (with options)
List of 1
$ include: logi FALSE
|......... | 13%
ordinary text without R code
|............ | 17%
label: unnamed-chunk-1 (with options)
List of 2
$ eval: logi FALSE
$ tidy: logi FALSE
|............... | 22%
inline R code fragments
...
|..........................................................| 100%
ordinary text without R code
Why repeating the message “ordinary text without R code” for a hundred times? How dare knitr declare that my text is ordinary? It is extraordinary!!
My apologies to all who have suffered from the meaningless garbage for ten years! The next version of knitr will get rid of the garbage information in the progress bar. The CRAN release may come later this month or next month. For now, you can try the development version:
install.packages('knitr', repos = c(
yihui = 'https://yihui.r-universe.dev',
CRAN = 'https://cloud.r-project.org'
))
# restart R, and make sure packageVersion('knitr') >= '1.41.8'
Then you should see a single-line progress bar when knitting a document, which
only shows the progress and the chunk label by default. The progress bar will be
cleaned up afterwards. In case you do want the previous verbose information, you
can enable it explicitly via options(knitr.package.verbose = TRUE).
If you don’t like the default text progress bar, you can use your own favorite
progress bar by setting the global option knitr.progress.fun (in .Rprofile).
For example, you may use winProgressBar on Windows, or progress bars in
cli or
progressr. See the
documentation for more details.
You can use this new option for any purpose of progress tracking. To quote Henrik:
It opens the door to use any combination of progress handlers while knitting, e.g. beepr, cli, progress, txtProgressbar, RStudio, notifier, rpushbullet, shiny, …
With a fresh start of 2023, I hope you will enjoy the fresh progress bar in knitr and make a lot of progress this year.
Donate
As a freelancer (currently working as a contractor) and a dad of three kids, I truly appreciate your donation to support my writing and open-source software development! Your contribution helps me cope with financial uncertainty better, so I can spend more time on producing high-quality content and software. You can make a donation through methods below.
-
Venmo:
@yihui_xie, or Zelle:xie@yihui.name -
Paypal
-
If you have a Paypal account, you can follow the link https://paypal.me/YihuiXie or find me on Paypal via my email
xie@yihui.name. Please choose the payment type as “Family and Friends” (instead of “Goods and Services”) to avoid extra fees. -
If you don’t have Paypal, you may donate through this link via your debit or credit card. Paypal will charge a fee on my side.
-
-
Other ways:
WeChat Pay (微信支付:谢益辉) Alipay (支付宝:谢益辉) 

When sending money, please be sure to add a note “gift” or “donation” if possible, so it won’t be treated as my taxable income but a genuine gift. Needless to say, donation is completely voluntary and I appreciate any amount you can give.
Please feel free to email me if you prefer a different way to give. Thank you very much!
I’ll give back a significant portion of the donations to the open-source community and charities. For the record, I received about $30,000 in total (before tax) in 2024-25, and gave back about $15,000 (after tax).