I would like to include an R calculation in the abstract. The R calculation is at the bottom of document, so when I compile the Rnw
file I get an error.
Here is a minimal example:
documentclass{article}
egin{document}
egin{abstract}
This paper... and we got a mean of Sexpr{mean.data}.
end{abstract}
<<>>=
data <- c(1,2,3,4,5)
mean.data <- mean(data)
@
end{document}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…