[R] follow-up

Greg Snow Greg.Snow at intermountainmail.org
Thu Jun 1 00:40:20 CEST 2006

To get the averages, look at ?tapply or ?aggregate

To exclude parts of the data look at ?subset

To remove the spaces in the lines around points look at ?matplot and
?plot specifically look for type='o'

To add a legend look at ?legend.

You may also want to look at the lattice package, using xyplot with
panel.superpose may work better for you (or may not). 

Hope this helps,

Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Rob Tirrell
Sent: Wednesday, May 31, 2006 2:35 PM
To: r-help at stat.math.ethz.ch
Subject: [R] follow-up

I've been able to get the data _of every individual_ into a graph (there
16 lines), but I have a few more questions...
How do I neatly get the average weights of each group (PC3/CO, PC3/FO,
FADU/CO and FADU/FO) and make a graph of four lines.
How do I exclude the first column (which is each animal's internal
description) - there is a spot on the x axis labeled 1 - that is blank
and presumably for that.  I think that explains why I get 17 "NAs
introduced by coercion" in warnings().
How do I add an argument to matplot() telling it to include a legend?
How do I instruct R to produce a graph that doesn't leave a space to
either side of the data point before the line is drawn?
I'll continue trying to work these out.

	[[alternative HTML version deleted]]

R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide!

More information about the R-help mailing list