Error with R function using Knitr in Lyx
I am getting an error when using the summary() function using Knitr in Lyx. The functions preceding it works. <<>>= library(faraway) head(teengamb) mdl <- lm(gamble ~ sex + status, data=teengamb) summary(mdl) @ I am inputing this code through Insert Tex Code in Lyx. I just tested I can run summary(teengamb) but not summary(mdl). Both codes work in RStudio. The error is "Undefined Control Sequence" with description "\end{verbatim} ..." This problem has been solved in knitr after version 1.1. You do not need to change anything in LyX or R. For now, you can install the development version from: