>From my experience, that is often an indication that you built R from
source but didn't pay attention to the cairo/pango dependencies. You
can either install R from a repository, or make sure you have all the
dependencies installed before you build R from source (e.g. for
Ubuntu, use apt-get build-dep r-base-dev).

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


On Tue, Aug 11, 2015 at 8:32 AM, Ramiro Barrantes
<ram...@precisionbioassay.com> wrote:
> Hello,
>
> I have the following reproducible knitr document:
>
> \documentclass{article}
> \usepackage[sc]{mathpazo}
> \usepackage[T1]{fontenc}
> \usepackage{geometry}
>
> \begin{document}
>
> <<test,dev="png",echo=FALSE>>=
> library(lattice)
> xyplot(1:2~1:2)
> @
>
> \end{document}
>
>
> but knitr is giving me an error:
>
> Quitting from lines 9-11 (test.Rnw)
> Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width,  :
>   unable to start device PNG
> In addition: Warning message:
> In (function (filename = "Rplot%03d.png", width = 480, height = 480,  :
>   unable to open connection to X11 display ''
>
> I don't have X11 installed in this machine and I was hoping not to have to.  
> I am guessing that this is the problem right?
>
> Any suggestions??
>
> Thanks,
> Ramiro

______________________________________________
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