Re: [R] follow-up

From: Greg Snow <>
Date: Thu 01 Jun 2006 - 08:40:20 EST

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
(801) 408-8111

-----Original Message-----
[] On Behalf Of Rob Tirrell
Sent: Wednesday, May 31, 2006 2:35 PM
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]]

______________________________________________ mailing list PLEASE do read the posting guide!
______________________________________________ mailing list PLEASE do read the posting guide!
Received on Thu Jun 01 08:47:19 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 01 Jun 2006 - 10:10:27 EST.

Mailing list information is available at Please read the posting guide before posting to the list.