Skip to content
Back to formatted view

Raw Message

Message-ID: <200211230611.07298.deepayan@stat.wisc.edu>
Date: 2002-11-23T12:11:07Z
From: Deepayan Sarkar
Subject: Small change to plot.xy
In-Reply-To: <3DDF5E3C.8D2B8A11@durham.ac.uk>

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