Skip to content
Back to formatted view

Raw Message

Message-ID: <alpine.LNX.2.00.1210240555560.7237@salmo.appl-ecosys.com>
Date: 2012-10-24T12:56:51Z
From: Rich Shepard
Subject: Understanding lattice barchart() display
In-Reply-To: <50878EE9.5090202@ucalgary.ca>

On Tue, 23 Oct 2012, Peter Ehlers wrote:

> As Bert correctly points out, you have more than one quant value per
> tclass/stream combination. You need to summarize your 1987-case data.frame
> to a 56-case data.frame (8 levels of tclass and 7 levels of stream). The
> easy way to do that is:
>
> benthos2 <- aggregate(quant ~ tclass + stream, data = benthos,
>                       FUN = sum)
>
> Then just use benthos2 as the data argument to barchart().

Peter,

   Thank you. I'll learn the aggregate function and do as you suggest.

Regards,

Rich