<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>knitr on Nan Xiao | 肖楠</title>
    <link>https://nanx.me/tags/knitr/</link>
    <description>Recent content in knitr on Nan Xiao | 肖楠</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Tue, 06 Jun 2023 20:30:00 +0000</lastBuildDate>
    <atom:link href="https://nanx.me/tags/knitr/index.xml" rel="self" type="application/rss+xml" />
    <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>
  </channel>
</rss>
