I'd recommend starting with a simpler .Rmd or .Rnw file, rather than using it with lyx. The basic .Rmd file below works for me without any further adjustments:
# Lattice test ```{r} library(lattice) xyplot(mpg ~ wt, data = mtcars) ``` Hadley On Fri, Jul 10, 2015 at 3:39 PM, Rich Shepard <rshep...@appl-ecosys.com> wrote: > On Fri, 10 Jul 2015, Hadley Wickham wrote: > >> You shouldn't be explicitly opening a device in a knitr document. > > > Hadley, > > Didn't think so. > >> I think maybe you should post a minimal document so we can figure out >> what's going wrong. > > > Agreed. Attached are the raw data (carlin.csv) and a stripped down LyX > document with the knitr chunks. > > This is my first attempt to use knitr; I'm reading the knitr book and > that's where I got the impression that lattice graphics are not supported. > > Rich > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- http://had.co.nz/ ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.