Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2009-01-27 21:06:09
Size: 127
Editor: platypus
Comment:
Revision 8 as of 2009-02-25 19:25:09
Size: 2310
Editor: cpe-74-67-179-53
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from LanguageLab/Labmeeting/SP09w2
Line 5: Line 6:
= Graphing with lattice and ggplot2 = = Graphing with {{{lattice}}} and {{{ggplot2}}} =

This meeting will cover data visualization with {{{lattice}}}, a modern {{{R}}} graphics package. This material will be based on a book by the authors of this packages, [[http://dsarkar.fhcrc.org/ Deepayan Sarkar]].

== {{{lattice}}} resources ==
 * [[http://www.amazon.com/Lattice-Multivariate-Data-Visualization-Use/dp/0387759689 the lattice book]]: Published in the UseR! series. Excellent reference with useful examples using standard {{{lattice}}} functions and customized functions.
 * the lattice book's [[http://lmdvr.r-forge.r-project.org/figures/figures.html website]]: gallery of all of the figures contained in the book, each produced in a color theme and a grayscale theme. Code can be seen next to each figure. Useful even if you don't have the book.
 * [[http://rseek.org]]: best search site for help with R. (but, also try {{{RSiteSearch()}}})
 
== Basic plots ==

 * {{{histogram}}}
 * {{{densityplot}}}
 * {{{xyplot}}}
 * {{{dotpot}}}
 * {{{barchart}}}


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.

== Tutorial code ==

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

[[attachment:lattice_tut.R]]


You can keep track of updates to this and my other tutorials at [[http://github.com/aufrank/tutorials/tree/master]].

== 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.

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

This meeting will cover data visualization with lattice, a modern R graphics package. This material will be based on a book by the authors of this packages, http://dsarkar.fhcrc.org/ Deepayan Sarkar.

{{{lattice}}} resources

Basic plots

  • histogram

  • densityplot

  • xyplot

  • dotpot

  • barchart

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.

Tutorial code

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

lattice_tut.R

You can keep track of updates to this and my other tutorials at http://github.com/aufrank/tutorials/tree/master.

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