[R] Bivariate Scatter Plots with Lattice

Rich Shepard rshepard at appl-ecosys.com
Fri Sep 23 00:03:17 CEST 2011


   Data frame has this structure:

'data.frame':	11169 obs. of  4 variables:
  $ stream  : Factor w/ 37 levels "Burns","CIL",..: 1 1 1 1 1 1 1 1 1 1 ...
  $ sampdate: Date, format: "1987-07-23" "1987-09-17" ...
  $ param   : Factor w/ 8 levels "As","Ca","Cl",..: 1 1 1 1 1 1 1 1 1 1 ...
  $ quant   : num  0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0 ...

   I want to create scatter plots of the concentrations (numeric column
'quant') for two specified chemicals (factor column 'param') for all dates
and streams (factor column 'stream') in which there are data.

   Looking in ?lattice and Deepayan's book did not provide an example. I've
tried varies formulae but without success, and would appreciate a pointer to
documentation and examples of how to write such an expression.

Rich



More information about the R-help mailing list