Here is my a code to demo what I cannot do. I use an R chunk to make a figure and use out.extra='angle=90' to make the figure post sideways on the page. Now how do I get my caption to go sideways too?
\documentclass{article}
\usepackage{subcaption}
\begin{document}
<<test-plot,echo=FALSE,fig.cap="I would like to be posted sideways under figure, NOT HERE",out.extra='angle=90'>>=
plot(1)
abline(0, 1)
plot(rnorm(10))
for(i in 1:10) {
abline(v = i, lty = 2)
}
@
\end{document}