From deepayan@stat.wisc.edu  Sat Nov 23 12:11:07 2002
From: deepayan@stat.wisc.edu (Deepayan Sarkar)
Date: Sat, 23 Nov 2002 06:11:07 -0600
Subject: [Rd] Small change to plot.xy
In-Reply-To: <3DDF5E3C.8D2B8A11@durham.ac.uk>
References: <Pine.LNX.4.31.0211231007350.4842-100000@gannet.stats> <3DDF5E3C.8D2B8A11@durham.ac.uk>
Message-ID: <200211230611.07298.deepayan@stat.wisc.edu>

On Saturday 23 November 2002 04:53 am, Jonathan Rougier wrote:

> > Does SPSS actually do this, that is arbitrarily assign colours to
> > categories that might be names of colours?
>
> I think you know the answer to that!  That wasn't my point.  I give
> statistical computing practicals using the same material to two similar
> groups of students, some using SPSS and some using R.  Right now, the
> SPSS students are getting a lot more experience of data analysis.  My
> SPSS students put Species in the "colour points by" box.  You and I may
> disagree on what is natural and what is peverse, but my R students want
> to do "col = iris$Species" and I am sympathetic.

This sort of thing is handled more systematically in Trellis. For example, try

library(lattice)
data(iris)
xyplot(Sepal.Length ~ Sepal.Width, data = iris, groups = Species)
splom(iris[, 1:4], groups = iris$Species)

(This doesn't exactly answer your original question, but I think it does 
address the example you have given here.)

Deepayan



[Rd] Small change to plot.xy
Deepayan Sarkar