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

Yihui Xie xie at yihui.name
Sat Jul 11 21:01:59 CEST 2015


I guess you didn't tell us you were compiling the document with dvips
(BTW, I'm surprised that dvips is still alive today...), otherwise the
solution would be simply to use the postscript device instead of the
default pdf device (i.e. use the chunk option dev='postscript').
Hopefully you learned some lessons on what a reproducible example
means.

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


On Sat, Jul 11, 2015 at 9:03 AM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
> On Fri, 10 Jul 2015, Yihui Xie wrote:
>
>> Your LyX example has two problems:
>
>
> Yihui, et al.:
>
>   All fixed now. After adding the specific libraries the chuck calling
> xyplot() to produce the graphic caused an error when I tried to generate a
> dvips preview:
>
> LaTeX Error: File 'figure/unnamed-chunk-7-1' not found.
>
> I could not locate the file with any of these extensions:
> .eps,.ps,.eps.gz,.ps.gz,.eps.Z
>
> Which is what sent me down the path of specifying pdf() and dev.off().
>
>   However, compiling with pdflatex produces the graphic in the document. All
> part of being brand new to using knitr.
>
> Thank you all very much,
>
> Rich



More information about the R-help mailing list