knitr
(>= v1.5) supports subfigures. You can use the chunk option fig.subcap
. Here is a minimal example.
\documentclass{article}
\usepackage{subfig}
\begin{document}
<<fig-sub, fig.cap='two plots', fig.subcap=c('one plot', 'the other one'), out.width=".49\\linewidth">>=
plot(1:10)
plot(rnorm(10), pch=19)
@
\end{document}
Related Contents:
- Set margin size when converting from Markdown to PDF with pandoc
- knitr/rmarkdown/Latex: How to cross-reference figures and tables?
- Get rid of \addlinespace in kable
- Tools for making latex tables in R [closed]
- YAML current date in rmarkdown
- Difference: “Compile PDF” button in RStudio vs. knit() and knit2pdf()
- Figure position in markdown when converting to PDF with knitr and pandoc
- How to combine two RMarkdown (.Rmd) files into a single output?
- Getting LaTeX into R Plots
- Using loops with knitr to produce multiple pdf reports… need a little help to get me over the hump
- In `knitr` how can I test for if the output will be PDF or word?
- r knitr chunk options for figure height / width are not working
- Rstudio rmarkdown: both portrait and landscape layout in a single PDF
- how to create a loop that includes both a code chunk and text with knitr in R
- How to use objects from global environment in Rstudio Markdown
- How to convert R Markdown to HTML? I.e., What does “Knit HTML” do in Rstudio 0.96?
- Using stargazer with Rstudio and Knitr
- How to hold figure position with figure caption in pdf output of knitr?
- Generate Dynamic R Markdown Blocks
- Create a loop that includes both a code chunk and text
- How to source R Markdown file like `source(‘myfile.r’)`?
- Conditionally display a block of text in R Markdown
- Programmatically creating Markdown tables in R with KnitR
- install.packages fails in knitr document: “trying to use CRAN without setting a mirror”
- R Markdown – variable output name
- R knitr: Possible to programmatically modify chunk labels?
- generate markdown comments within for loop
- R knitr Markdown: Output Plots within For Loop
- Setting work directory in knitr using opts_chunk$set(root.dir = …) doesn’t work
- knitr gets tricked by data.table `:=` assignment
- Can Sweave produce many pdfs automatically?
- Extract the maximum value within each group in a dataframe [duplicate]
- Opposite of %in%: exclude rows with values specified in a vector
- How to force R to use a specified factor level as reference in a regression?
- Extracting the last n characters from a string in R
- Read fixed width text file
- How to save plots that are made in a shiny app
- Run VBA script from R
- How to use a string variable to select a data frame column using $ notation [duplicate]
- using stat_function and facet_wrap together in ggplot2 in R
- Understanding `scale` in R
- Print unicode character string in R
- Count number of rows matching a criteria
- Changing Fonts for Graphs in R
- Superscript and subscript axis labels in ggplot2 [duplicate]
- Milliseconds in POSIXct Class
- Extract prediction band from lme fit
- percentage on y lab in a faceted ggplot barchart?
- Get the size of the window in Shiny
- Consolidate duplicate rows