I have a figure with subfigures in R Markdown. How do I cross-reference these in the text as Figure 1a, Figure 1b etc?
```{r figgy, fig.cap='Caption', echo = FALSE, fig.ncol = 2, out.width = "50%", fig.align = "center", fig.subcap=c('(a)', '(b)', '(c)')}
plot(1:10)
plot(cars, pch = 19)
boxplot(Sepal.Width ~ Species, data = iris)
```
Code from R Markdown Cookbook. I'm using bookdown::tufte_handout2
Use the
\subref*command to refer to the subfigures. Usually, the cross-referencing syntax would be\subref*{<code-chunk-label>:<plot-serial-no>}. And I have usedsubrefformat=simpleso that the reference style looks like1ainstead of1(a).