Re: [R] Two factors -> nurical data dependency analyzing

From: Prof Brian Ripley <>
Date: Mon 20 Feb 2006 - 01:49:21 EST

On Sun, 19 Feb 2006, Evgeniy Kachalin wrote:

> Hello, dear R users.
> What is the easiest and the most visualli understandable way to analize
> dependency of numerical variable on two factors?

interaction.plot() is a good start.

> Is the
> boxplot(y~f1+f2) the good way? It seems that this formula does not work.

No, nor is it documented to: the help page is there to help you. You need a single factor as the grouping, so make one via an interaction. boxplot(y ~ f1:f2) should work. E.g.

boxplot(FL ~ sex:sp, data=crabs)

Another idea is to use lattice's bwplot. E.g.

bwplot(FL ~ sex | sp, data=crabs)

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Mon Feb 20 01:55:16 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:35 EST