I've a data frame with this structure:

'data.frame':   1987 obs. of  11 variables:
 $ site         : Factor w/ 24 levels "B(W)","BC-1",..: 1 1 2 2 2 1 1 1 ...
 $ sampdate     : Date, format: "2000-07-18" "2000-07-18" ...
 $ tclass       : Factor w/ 8 levels "Annelida","Arachnida",..: 1 5 5 5 5 ...
 $ torder       : Factor w/ 18 levels "Achtinedida",..: 13 5 5 10 13 5 7 ...
 $ tfamily      : Factor w/ 81 levels "","Ameletidae",..: 79 46 46 14 42 ...
 $ tgenus       : Factor w/ 206 levels "","Acentrella",..: 1 10 10 1 140 ...
 $ tspecies     : Factor w/ 60 levels "","aequalis",..: 1 1 1 1 1 1 1 ...
 $ quant        : int  22 527 22 22 11 97 333 11 108 11 ...
 $ stream       : Factor w/ 7 levels "BCrk","JCrk",..: 1 1 1 1 1 1 1 1 ...
 $ basin        : Factor w/ 2 levels "H","O": 2 2 2 2 2 2 2 2 2 2 ...

  When I create a bar chart for tclass by stream the resulting bars appear
to have multiple segments (see attached pdf) from this command:

barchart(quant ~ tclass | stream, data = benthos, main = 'Taxonomic
Classes', xlab = 'Class Name', ylab = 'Number/square meter', scales = list(x
= list(rot = 90)))

and I want to understand what the segments represent. I thought the formula
'quant ~ tclass' would produce one bar per class. I cannot find the answer
in the ?barchart help page (it may be there and I'm not seeing it) or the
Lattice book. Your help in increasing my understanding is appreciated.

TIA,

Rich

Attachment: class-by-stream.pdf
Description: Adobe PDF document

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to