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.