Differences between revisions 3 and 4
Revision 3 as of 2009-01-27 21:47:22
Size: 1729
Editor: cpe-74-69-93-157
Comment:
Revision 4 as of 2009-02-03 15:12:16
Size: 1762
Editor: wireless
Comment:
Deletions are marked like this. Additions are marked like this.
Line 37: Line 37:
[[attach:lattice_tutorial.R]]

Graphing with {{{lattice}}} and {{{ggplot2}}}

This meeting will cover data visualization with two modern R graphics packages, lattice and ggplot2. This material will be based on books by the authors of these packages: http://lmdvr.r-forge.r-project.org/figures/figures.html the lattice book and http://had.co.nz/ggplot2/book/ the ggplot2 book.

Basic plots

For lattice, this means covering the commands

  • histogram

  • densityplot

  • xyplot

  • dotpot

  • barchart

and for ggplot2, covering the command

  • qplot

For all of the above plots, we'll discuss the use of panels (or facets) and groups in plots.

Labels, annotation, and appearance

We'll talk about how to add legends, keys, text, titles, and other explanatory elements to plots. We'll also cover ways to define colors and color schemes. Finally, we'll talk about changing the appearance of text elements (fonts and sizes). The creation of themes will be introduced, but not covered in detail.

Custom plotting functions

If time permits, we'll discuss ways to build up customized plotting functions using both packages. For lattice, this means learning about panel.* functions. For ggplot2, this means learning about geoms, stats, and scales.

Tutorial code

Check back before the meeting to download a script that will contain all of the R code used in the tutorial.

attach:lattice_tutorial.R

Comments and questions

If there's anything in particular you'd like to see covered, or any questions you want answered, feel free to record them here.

LabmeetingSP09w2 (last edited 2009-02-25 19:25:09 by cpe-74-67-179-53)

MoinMoin Appliance - Powered by TurnKey Linux