[R-pkgs] New version of the knitr package (0.5)

Yihui Xie xie at yihui.name
Wed May 2 23:31:51 CEST 2012


The knitr package version 0.5 is on CRAN now. It has gone through
extensive development in the past few months, and about 200 issues
were solved (https://github.com/yihui/knitr/issues) thanks to the
feedback of users, which greatly improved the quality and usefulness
of this package. For a complete list of changes, see
https://github.com/yihui/knitr/blob/master/NEWS

Most notable new features are:

- chunk options can be arbitrary valid R code, e.g. <<echo=!TRUE,
results=ifelse(x, 'asis', 'markup')>>=; this makes a document really
programmable, and the syntax is also consistent with normal R code;
http://yihui.name/knitr/demo/sweave/
- the listings package is supported via render_listings(), and the
styles are based on Sweavel.sty (courtesy of Frank Harrell);
http://yihui.name/knitr/demo/listings/
- for HTML/markdown documents, R plots can be automatically uploaded
to Imgur to make sure the output is self-contained (no need to copy
images when publishing the output);
http://yihui.name/knitr/demo/upload/
- arbitrary recursive references of code chunks with <<label>> (e.g.
chunk A can call chunk B which in turn calls C);
http://yihui.name/knitr/demo/reference/
- for cached chunks, their dependencies can be automatically figured
out by analyzing the R code for global and local variables (see the
'autodep' option)
- new chunk options fig.cap and fig.scap to create figure environments
with captions in LaTeX;
- Sweave concordance was implemented and integrated with RStudio so
that error navigation and PDF/Rnw sync become easy
- more comprehensive support to markdown and reStructuredText;
markdown is also well supported in RStudio (preview version); see
http://yihui.name/en/2012/05/how-to-make-html5-slides-with-knitr/
- other languages like Python and Awk can also be supported, e.g.
https://github.com/yihui/knitr/blob/master/inst/examples/knitr-lang.Rmd

Suggestions and questions are welcome; please join the mailing list
https://groups.google.com/group/knitr or file issues to Github.
Thanks!

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



More information about the R-packages mailing list