Yihui Xie | 谢益辉

Make HTML Elements Full-width Automatically via JavaScript and CSS

Original link: https://yihui.org/en/2023/09/auto-fullwidth/ I mentioned a simple CSS trick to generate full-width figures in 2021. I was thinking the other day if I could make certainly automatic elements, so I do not need to manually specify them to be full-width. Finally, I wrote some JS code to deal with three types of elements automatically: Code …

Make HTML Elements Full-width Automatically via JavaScript and CSS Read More »

The Upcoming knitr v1.44: More Compatible with Quarto, and Locking `opts_current`

Original link: https://yihui.org/en/2023/09/knitr-1-44/ After coming back from vacation , I mainly spent my time on the knitr package maintenance. I will make a new release soon, and want to quickly highlight a few things in this post. For the full list of changes, please read the NEWS.md in the Github repo. Working better with Quarto …

The Upcoming knitr v1.44: More Compatible with Quarto, and Locking `opts_current` Read More »

rmarkdown::output_format_dependency(): An Easier Way to Customize Output Formats for R Markdown

Original link: https://yihui.org/en/2023/08/output-format-dependency/ Traditionally there are two main ways to customize R Markdown output formats: One is to use the options of an existing output format, eg, set toc: true for html_document ; the other is to define a new output format function based on rmarkdown::output_format() , which usually requires you to develop an R …

rmarkdown::output_format_dependency(): An Easier Way to Customize Output Formats for R Markdown Read More »

Please Avoid Using Hugo v0.112.x

Original link: https://yihui.org/en/2023/05/hugo-112/ To new blogdown users: the current latest Hugo version 0.112.x series have some serious bugs and I’d Strongly recommend against using these versions of Hugo. For now, the highest The version of Hugo that you can use is 0.111.3, which you can install with: blogdown::install_hugo(‘0.111.3’) # if you have installed higher versions, …

Please Avoid Using Hugo v0.112.x Read More »

The Status of the DT Package

Original link: https://yihui.org/en/2023/05/dt-status/ My first job at RStudio (now rebranded to Posit) was to integrate the JS library DataTables into Shiny . That was in 2013, almost ten years ago. To be honest, I have never been highly interested in tables, and working on tables was just a random start of my professional career. Since …

The Status of the DT Package Read More »

Share Your Goodwill

Original link: https://yihui.org/en/2023/04/share-your-goodwill/ Recently I often hear my son sing a song at home that sounds touching to me. The incomplete lyrics from his mouth included sentences like “remember there are people not as fortunate as you”. That’s exactly what I have been telling him since he was four years old when he complained about …

Share Your Goodwill Read More »

Do You Have to get() Objects?

Original link: https://yihui.org/en/2023/04/get-objects/ Last month I saw an interesting question on Stack Overflow, in which the OP wanted to print a series of data frames as tables, and tried double loops, which did not work: for (i in c(“CP”, “BK”, “IT”, “WP”)) { for (j in c(“DD”, “SI”)) { data <- get(paste0(i, “_”, j, “_comb1”)) …

Do You Have to get() Objects? Read More »

river god

Original link: https://yihui.org/cn/2022/07/river-god/ Granny Tang waved the flag and shouted The whole staff of Xiaoqianhe soup house Drag and drag together Pulled out the thorn of the rotten god Unplugged bicycles, rags, refrigerators, fishing lines Pulled out large swathes of rubbish and sludge Rush through the medicinal bath Just discovered God of Decay doesn’t really …

river god Read More »