I am writing a HTML document with knitr. My settings are:
---
fontsize: 12pt
output:
html_document:
fig_height: 7
fig_width: 9
keep_md: yes
smart: no
---
```{r global_options, include = FALSE}
knitr::opts_chunk$set(comment = NA)
```
I have a few code chunks that produce figures. Each of these chunks produces a single figure. I label the chunks with the understanding that, when I knit the document, the chunk labels become the file-names of the figures. For example, the chunk that I label "mtcar_histogram" should produce the file "mtcar_histogram.png".
But when I navigate to the "figure-html" sub-directory of the directory containing my document, I see that all the figures have an automatic numerical suffix. For example, I see "mtcar_histogram-1.png" instead of "mtcar_histogram.png".
When I checked the knitr options documentation, I read that:
"Note any number of plots can be recorded in a single code chunk, and this package does not need to know how many plots are in a chunk in advance -- it can figure out automatically, and name these images as fig.path-label-i where i is incremental from 1"
But as I stated earlier, none of my chunks produce multiple plots, so the numbering is un-necessary for me.
Is there a means of dis-abling the numbering?