Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

knitr figure produced twice (with R 3.0.0)

Tags:

r

knitr

I have an Rnw file, which worked fine before upgrading to R 3.0.0 (and knitr 1.2). I found a similar problem described in knitr problem after update to R 3.0.0

I followed the answer, to update to knitr 1.2.4 (rforge version). The problem persists!

Now, one chunk causes a problem (and one chunk only), which produces two figures. The chunk is called plotc, and both plotc1.pdf and plotc2.pdf are produced. After knitting, pdflatex throws the error:

!pdfTeX error: pdflatex (file c:/repos/uws-r-manual/figure/plotc1.pdf): PDF inclusion: required page does not exist <0> ==> Fatal error occurred, no output PDF file produced!

If needed, I can give access to the bitbucket repo if someone wants to reproduce/fix this problem.

like image 548
Remko Duursma Avatar asked Nov 28 '25 03:11

Remko Duursma


1 Answers

I have fixed the problem in the development version (v1.2.5). See here for instructions on installation. It will go to the stable version 1.3 eventually.

like image 182
Yihui Xie Avatar answered Nov 30 '25 18:11

Yihui Xie