I would like a co-author to edit a lyx file I created. He doesn't have knitr installed and he is going to edit only text and equations parts of the document where knitr generated content is not present. I would still like him to be able to generate the pdf file from lyx though. Under Documents / settings / modules, I can delete the Rnw (knitr) module. But then there are errors appearing.
I posted a sample lyx file under knitr_iris.lyx. When the knitr module is activated, Pdf generation works fine, but when you deselect the knitr module under Documents / settings / modules, the following errors pop up:
! You can't use `macro parameter character #' in horizontal mode.
! Missing $ inserted.
These are due to the use of $ and # in R. How to tell Lyx that knitr chunks are not latex code but something else that it should ignore?