On Fri, 10 Jul 2015, Yihui Xie wrote:

Your LyX example has two problems: 1) We don't have your .RData; 2) You
didn't library(reshape) and library(lattice). Hence it is not a
self-contained reproducible example.

Yihui,

  I assumed that reading in the *.csv file would create a local .RData file.

  Here, lattice and reshape2 are loaded when R is invoked. However,
explicitly loading them in the embedded code will be done.

After fixing these two issues, I don't see why lattice graphics can be
problematic with knitr. There is no need to print() the plot, and no
need to pdf(), either. See the attached PDF I generated.

  I'll see if requireing those two libraries in the document resolves the
issue. Initially, I did not specify pdf() and added the explicit print()
based on that suggestion in this thread.

  Will test later today.

Thanks very much,

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.

Reply via email to