Message-ID: <200809091338.m89DcMWa016845@idmailgate1.unizh.ch>
Date: 2008-09-09T13:38:14Z
From: Erich Studerus
Subject: plotting group means
In-Reply-To: <f8e6ff050809090601r5d2d41afl9406c1e3b4b82602@mail.gmail.com>
Thanks for all the suggestions, but it seems, that all these functions need
a rearrangement of my data, since in my case, the dependent variables are in
different columns. The error.bars.by-function seems to be the only plotting
function, that does not need a rearrangement. Are there other functions,
which can do that or is there an easy way to rearrange the columns into one?
Thanks
Erich
-----Urspr?ngliche Nachricht-----
Von: hadley wickham [mailto:h.wickham at gmail.com]
Gesendet: Dienstag, 9. September 2008 15:02
An: ONKELINX, Thierry
Cc: Erich Studerus; r-help at r-project.org
Betreff: Re: [R] plotting group means
On Tue, Sep 9, 2008 at 6:56 AM, ONKELINX, Thierry
<Thierry.ONKELINX at inbo.be> wrote:
> Dear Erich,
>
> Have a look at ggplot2
>
> library(ggplot2)
> dataset <- expand.grid(x = 1:20, y = factor(LETTERS[1:4]), value = 1:10)
> dataset$value <- rnorm(nrow(dataset), sd = 0.5) + as.numeric(dataset$y)
Or with stat_summary:
qplot(x, value, data=dataset, colour=y, group = y) +
stat_summary(geom="line", fun="mean",size=2)
--
http://had.co.nz/