I'm working with knitr
Is it possible to reference data from a figure in the paper?
I have a code chunk that produces a figure in the appendix of my paper. I know how to reference the figure itself
"figure 5 shows a histogram..."
with
"figure \ref{fig:hist_fig} shows a histogram..."
and, in the appendix,
\begin{figure}
<<hist_fig, cache=FALSE, echo=F>>=
require(ggplot2)
@
\caption{\label{fig:hist_fig} An example histogram}
\end{figure}
with another R file that starts with # ---- hist_fig ---- and contains the data that produces the histogram, mean, and variance.
but is it possible to reference data from the figure in the paper as well? For instance "figure 5 has a mean of 6 and a variance of 3."
Would this method work for randomly generated data sets that aren't the same on each run?
dependsonoption would help? – wilx Jul 26 '16 at 11:06