Skip to content
Prev 307015 / 398506 Next

help with making figures

First convert your data from short fat to long thin format: Column
headings  for the transformed data frame are:

Year     Site     Result

This can be done in a variety of ways, but check out the reshape2
package or the reshape function ins the stats package.

Once you have the data in this form, , say in the data frame, mydat,
you can plot the series by sites in a trellised layout. Either the
lattice or ggplot2 package can do this easily. e.g. in lattice it is:

xyplot(Result ~Year|Site, data = mydat, type = "b")

You can adjust the layout etc. to your taste.

There's lots more you can do, depending on what is important to you,
but that should get you started.

Cheers,
Bert
On Thu, Oct 4, 2012 at 1:01 PM, megalops <megalops31 at hotmail.com> wrote: