I have a document where I define a figure label once inside fig.caption option in a chunk, and then reference it in the text using \ref{}. For instance,
```{r dataCorrA, results="hold", echo = FALSE, fig.pos = "ht", fig.width=5, fig.height=5, fig.cap="\\label{fig:dataCorr} Some caption."}
data("airquality", package = "datasets")
GGally::ggcorr(airquality)
blah blah blah ... figure \ref{fig:dataCorr}
But upon knitting, I get
LaTeX Warning: Label `fig:dataCorr' multiply defined.
How can I get rid of the warning?