No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

This document is meant to be processed with the knitr package, a re-implementation and generalization of Sweave that takes the concept of report generation with code to an entirely different level. For information about the package, see Look under the Demos link for a growing body of documentation.

The structure of code chunks in knitr is similar to that of Sweave, but the arguments in the header are, in general, different. The basic structure is

    your code here

where the first argument is the name of the chunk and the remaining arguments are chunk options. See for further details.

The source file ggplot2-0.9.0.Rnw is contained in this repo. To run the source code yourself in R, you need the latest version of knitr and a version of ggplot2 that is at least 0.9.0 (at the time this is [re]written, the current version is 0.9.3).

After downloading the source file, put it into a directory. By default, it will create a color version. From the command line prompt, typing


will process the .Rnw file and output both a ggplot2-0.9.0.tex file and a corresponding pdf file.

To get a B/W copy, for example to print on a B/W printer, create a subdirectory named bw in the directory that contains the .Rnw file. Start up R and setwd() to the directory containing the .Rnw file. From the directory containing the .Rnw file, type the following from the command line:

bw_version <- TRUE

That's it. Thanks to Yihui Xie for fixing up the document to make it compatible with the current version of the superb knitr package.

If you have any questions, e-mail me at djmuseR at gmail dot com.

Thanks! Dennis