我把下面的代碼從here通過@AnandaMahto寫的。此功能以前工作正常,但停止使用R 3.1.1
和knitr 1.6.10
。任何幫助將不勝感激。由於helpExtract功能不中的R 3.1.1工作,knitr 1.6.10
\documentclass{article}
\begin{document}
<<echo=FALSE>>=
library(devtools)
source_gist("https://gist.github.com/mrdwab/7586769")
@
\Sexpr{knit_child(textConnection(helpExtract(cor, section="Arg", type = "s_text")),
options = list(tidy = FALSE, eval = FALSE))}
\Sexpr{knit_child(textConnection(helpExtract(cor, type = "s_code")),
options = list(tidy = FALSE, eval = FALSE))}
<<tidy=TRUE>>=
## normal R code
args(lm)
@
\end{document}
讓我們看看@AnandaMahto是否有任何解決方案。 – MYaseen208
奇怪。如果函數的內容是逐行運行的,它們似乎輸出了預期的內容。 – A5C1D2H2I1M1N2O1R2T1
@AnandaMahto:它對你有用嗎? – MYaseen208