In my usecase, I import multiple pdf files (with plots in it). How do I label the subplots?
{r correaltionPlotRF, out.width="50%", fig.show='hold', echo=FALSE, fig.cap = "Corrlation Plot"}
# All defaults
img1_path <- "./images/corrPlotA.pdf"
img2_path <- "./images/corrPlotB.pdf"
knitr::include_graphics(c(img1_path, img2_path))
If I improve code by addition of fig.subcap=c('one plot', 'the other one')
{r correaltionPlotRF, out.width="50%", fig.show='hold',fig.subcap=c('one plot', 'the other one'), echo=FALSE, fig.cap = "Corrlation Plot"}
I get following error and does not compiles into updated pdf:
! Undefined control sequence.
<recently read> \subfloat
Expected Solution:
- Able to display labels (captions) for each plots
- Able to display main label (main caption)
SOLUTION: