Note that there are some explanatory texts on larger screens.

plurals
  1. POknitr has stopped outputting plots
    primarykey
    data
    text
    <p>I recently ran into a problem with knitr in R, where it suddenly stopped making plots. It does not report any problems, issues. It just that chunk that makes a plot (native R or ggplot2) does nothing. The chunk is evaluated, but somehow regarded as a chunk without R code.</p> <p>I've reduced the problem to a minimal example, but have no idea what has gone wrong. The entire file can be found at <a href="http://pastebin.com/pJUYjkxd" rel="nofollow noreferrer">http://pastebin.com/pJUYjkxd</a> and has this single chunk. Should be pretty straightforward?</p> <pre><code>&lt;&lt;mas11,dev='png'&gt;&gt;= plot(x=1:10, y=rnorm(10)) @ </code></pre> <p>But knitting it produces the following output (with R version 2.14.1):</p> <pre><code>Rscript --vanilla -e "library(knitr); knit('test.dev.2.Rnw');" processing file: test.dev.2.Rnw |&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; | 33% ordinary text without R code |&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; | 67% label: mas11 (with options) List of 1 $ dev: chr "png" |&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;| 100% ordinary text without R code output file: /home/stefan/Repos/manuscript1/datahandling/test.dev.2.tex </code></pre> <p>And the final pdf-file is <img src="https://i.stack.imgur.com/5yX7f.png" alt="enter image description here"> where you can see the chunk has been echoed.</p> <p>I have no idea how to resolve this problem! Kindly help.</p> <p><strong>Update</strong></p> <pre><code>&gt; sessionInfo() R version 2.14.1 (2011-12-22) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_DK.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_DK.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_DK.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] knitr_0.8 loaded via a namespace (and not attached): [1] digest_0.5.2 evaluate_0.4.3 formatR_0.6 plyr_1.8 stringr_0.6.1 [6] tools_2.14.1 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload