LyX Version 2.1.1 R version 3.1.0 (2014-04-10) -- "Spring Dance" Platform: x86_64-w64-mingw32/x64 (64-bit) MikTex ver 2.9
I have just installed LyX and cannot get plots in the output. I can get basic knitr examples with no plots to complie to a pdf.
If I View[Ctrl-R] the file knitr-minimal.lyx from within LyX I get the above error message, "LaTeX Error: File `figure/minimal-boring-plots1' not found." with description: " ...\linewidth]{figure/minimal-boring-plots1}
I could not locate the file with any of these extensions: .png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2"
However, if I save the knitr-minimal.Rnw file to my R work directory, then run the R script: require(knitr) rnwfile <- "knitr-test.Rnw" knit(rnwfile)
This will produce a TeX file, knitr-minimal.tex, in my work directory, that MikTeX compiles correctly to a pdf with plots included.
I assume I have something setup incorrectly in LyX:(
Any help would be appreciated.
Thanks bob
remove.packages(knitr)
in R (confirm that it is removed by trying to load it), and then install cran.r-project.org/src/contrib/Archive/knitr/knitr_1.5.tar.gz – scottkosty