[R] boxplot via plot command

Ken Knoblauch ken.knoblauch at inserm.fr
Tue Dec 2 09:45:58 CET 2008


Antje <niederlein-rstat <at> yahoo.de> writes:
> I've just discovered that the following code leads to boxplot 
> (surprisingly to me).
> Can anybody explain to me why? Is this documented somewhere? I've never 
> consider this option before.
> x <- rnorm(300)
> l <- c(rep("label1",100), rep("label2",50), rep("label3",150))
> df <- data.frame(as.factor(l), x)
> plot(df)
Just to complete my  response, 
the documentation for plot.data.frame indicates

For a two-column data frame it plots the second column 
against the first by the most appropriate method for 
the first column.


kk

-- 
Ken Knoblauch
Inserm U846
Institut Cellule Souche et Cerveau
Département Neurosciences Intégratives
18 avenue du Doyen Lépine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.sbri.fr



More information about the R-help mailing list