After upgrading R to version 3.1.0 (from some version 2.x.x), the following sweave code does not produce any pdfs for the plots anymore:
\documentclass[a4paper,10pt]{article}
\SweaveOpts{echo=FALSE}
\begin{document}
\begin{figure}
\begin{center}
<<fig = T, echo = F, include=T>>=
x=rnorm(100)
plot(x)
@
\caption{My Graph}
\end{center}
\end{figure}
\end{document}
To compile, I use R CMD Sweave foo.Rnw
followed by R CMD pdflatex foo.tex
. Why is that and how can I fix it? I played around with the options: fig = TRUE
, pdf = TRUE
and so on - to no avail.
Edit: Here is the output of R CMD Sweave foo.Rnw
, which should create the pdf files:
R CMD Sweave foo.Rnw
stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.
Output file: foo.tex
R CMD pdflatex foo.tex
....
ggplot2
for R version 3?ggplot2
and all of its dependencies.