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

David Winsemius dwinsemius at comcast.net
Sat Jul 11 02:00:15 CEST 2015


On Jul 10, 2015, at 2:57 PM, Rich Shepard wrote:

> On Fri, 10 Jul 2015, Hadley Wickham wrote:
> 
>> Have you tried explicitly print()ing the lattice graphics in your knitr
>> doc?
> 
> Hadley,
> 
>  Only now. Had not thought of trying this before.
> 
> pdf('carlin-1-descriptive.pdf')
> print(xyplot(value ~ sampdate | variable, data=carlin.1.melt, rm.na = T))

#Generally one needs to complete a pdf() call with:

dev.off()

# And an empty file is the symptom os such a failure.


David.
> 
> No error messages, but no graphic, either. Without specifying the pdf
> device, TeX complains it cannot find a graphics device and lists bit-mapped,
> ps and svg devices.
> 
>  Most likely I do not have the correct syntax.
> 
> Thanks,
> 
> 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.

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list