I was trying to install Knitr package in Lyx but I encountered the following error.
"The module knitr requires a package that is not available in your Latex installation or a converter that you have not installed. Latex output may not be possible. Package missing Knitr>latex."
I would greatly appreciate if you could please help me to fix this problem. I checked the Lyx module but couldn't figure out exactly what to do. I am a new user to Lyx and Knitr.
Thank you in advance
If you are using RStudio, then the “Knit” button (Ctrl+Shift+K) will render the document and display a preview of it.
knitr is an engine for dynamic report generation with R. It is a package in the programming language R that enables integration of R code into LaTeX, LyX, HTML, Markdown, AsciiDoc, and reStructuredText documents. The purpose of knitr is to allow reproducible research in R through the means of literate programming.
I had this same error message on my Windows 10 machine and found that the error was in the path I provided for R. If you don't have the path all the way to the R executable, it will not work. Change the path in Lyx with Tools>Preferences>Paths and edit the PATH prefix content. I had to add
C:\Program Files\R\R-3.6.0\bin\x64
That is often an indication of the PATH problem; see the first section of the LyX/Sweave/knitr manual (link to PDF is at http://yihui.name/knitr/demo/lyx/)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With