I'm using knitr 1.6.10
in R 3.1.1
. The chunk option code
seems like does not work. My MWE in .Rnw
format is below:
\documentclass{article}
\begin{document}
<< packages, include=FALSE, cache=FALSE>>=
library(knitr)
library(formatR)
@
<<test, code=formatR::usage(lm), eval=FALSE>>=
@
\end{document}
Previously this function was working (See here) but it is not working even-though formatR::usage(lm)
working outside chunk code.
The answer you mentioned has stated that the formatR version must be >= 0.10.3, which is a development version.
devtools::install_github('yihui/formatR')