Publications by Yihui Xie
formatR update (0.1-5)
The formatR package has been silent for quite a few months now. Recently I’ve been moving my old packages from R-Forge to GitHub, and I finally killed several things on my TODO list. In the past, I made an awkward decision to let formatR depend on the animation package, which was ridiculous. Ronggui suggested me remove this dependency long time...
2263 sym R (40 sym/2 pcs)
A Special Graphics Device in R: the Null Device
It is well-known that R has several graphics devices — either the screen devices (X11(), windows(), …) or the off-screen devices (pdf(), png(), …). We can query the default graphics device in options(): getOption('device') In a non-interactive session, the default device is pdf(). This is why Sweave has to create a file named Rplots.pdf no...
1809 sym R (461 sym/3 pcs)
Happy New Year with R (2011, Fireworks!)
Last year I posted an animation created in R to celebrate the new year, and this year I’ve got a more fabulous animation (available on CRAN) The above animation comes from the demo('fireworks') in the R package animation 2.0-0. Thanks for the contribution of Weicheng Zhu. Another demo I did not mention on this Christmas was demo('Xmas2'): Tha...
926 sym 4 img
Customizing the Theme of Your R HTML Help
R’s default theme of the HTML help pages is too plain for me to read, but we can easily modify the theme, which is essentially a CSS file. You can find the file under: file.path(R.home('doc'), 'html', 'R.css') Simply replace this file with my version: Download R.css (1K) which looks like: R HTML Help Theme Of course you can design your own R.c...
959 sym R (42 sym/1 pcs) 2 img
formatR update (0.1-6)
A new version of the formatR package is available on CRAN now (binary packages are still on the way). There are three major updates: the inline comments will also be preserved in most cases (in earlier versions, only single lines of comments are preserved) tidy.source() gained a new argument 'text' to accept a character vector as the source code...
1511 sym R (778 sym/2 pcs)
New versions of GGobi and rggobi for Windows users
For those who have been struggling with the installation of GGobi and the rggobi package under Windows: a major update of GGobi 2.1.9 is that GTK+ has been bundled with GGobi, so the installation of GTK+ is no longer required (I recommend you to uninstall it if it is not used elsewhere in your system); besides, the rggobi package, which interface...
1394 sym
Produce Authentic Math Formulas in R Graphics
I remember a few weeks ago, there was a challenge in the R-help list to make the prime symbol in R graphics. In LaTeX, we simply write $X'$ or $X^\prime$. R has a rough support for math expressions (see demo(plotmath)) and they are certainly unsatisfactory for LaTeX users. In fact we can write native LaTeX code in R plots via the tikzDevice packa...
1094 sym R (889 sym/1 pcs) 4 img
Sweave and pgfSweave in LyX 2.0.x (experimental)
About half a year ago, I wrote a post on the configuration of (pgf)Sweave and LyX, which was intended to save us some efforts in going through all the details during the configuration. Now many things have changed: LyX 2.0 has internal support for Sweave, and fortunately I have been in touch with the developers on this feature (thanks to Gregor);...
3799 sym R (47 sym/1 pcs)
The fun Package: Use R for Fun!
A couple of days ago we released a package named fun to CRAN, but I did not dare to send an announcement to [email protected] as usual. This package is a collection of some classical computer games (e.g. the Mine sweeper and Five in a row) as well as other funny stuff. Some examples: ## install.packages('fun') library(fun) if (.Platform$OS.type ...
2260 sym R (220 sym/4 pcs) 6 img
knitr: Elegant, flexible and fast dynamic report generation with R
The world has changed. You can feel it on GitHub. You can smell it on Google+. The knitr package, as an alternative tool to Sweave, has features that you have been longing for, and features that you might have never imagined. Thumb through the PDF manual to see some of them. Currently this package is still a beta version, so I’m looking for fee...
1660 sym