1

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.

halfer
  • 19,824
  • 17
  • 99
  • 186
MYaseen208
  • 22,666
  • 37
  • 165
  • 309

1 Answers1

1

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')
Community
  • 1
  • 1
Yihui Xie
  • 28,913
  • 23
  • 193
  • 419