Tuesday, December 04, 2012

Knitr problem

I got some weird problem with my R workflow recently. For example, the very simple code chunk below:
--------------------------------------------------
\documentclass[preview]{standalone}

\begin{document}

\begin{figure}
<dev='tikz'>>=
library(ggplot2)
qplot(displ, hwy, data = mpg, colour = factor(cyl))
@
\end{figure}

\end{document}

--------------------------------------------------
would not build correctly. Sometimes it gave error message, sometimes it created empty page, etc. Installing the latest version of knitr from the github repo seemed to solve the problem.

No comments:

Counter