[R] Trellis Plots: translating lattice xyplot() to ggplot()

Yihui Xie xie at yihui.name
Sat Jul 11 03:46:37 CEST 2015


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.

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.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Web: http://yihui.name


On Fri, Jul 10, 2015 at 7:18 PM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
> On Fri, 10 Jul 2015, David Winsemius wrote:
>
>> #Generally one needs to complete a pdf() call with:
>>
>> dev.off()
>>
>> # And an empty file is the symptom os such a failure.
>
>
>
> David,
>
>   I did leave that off the example file, but it make no difference. The
> attached is the compiled example.pdf
>
> Rich
> ______________________________________________
> R-help at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.pdf
Type: application/pdf
Size: 57487 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20150710/ca3f32e2/attachment.pdf>


More information about the R-help mailing list