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
Hi,
I've been able to get the data _of every individual_ into a graph (there
are
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.
Thanks,
Rob
[[alternative HTML version deleted]]
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html