Re: [R] ggplot / reshape: basic usage

2008-02-05 Thread baptiste Auguié
Sorry i realize my example was silly. I've played a bit more and i now have a working example using base graphics and the plotCI function from the plotrix package (reproduced for self-consistency). I start with some scatterplot, and I want to group the data in say 4 arbitrary intervals along

Re: [R] ggplot / reshape: basic usage

2008-01-23 Thread hadley wickham
On Jan 23, 2008 10:44 AM, baptiste Auguié <[EMAIL PROTECTED]> wrote: > Hi, > > I've been trying to do the following simple thing: given a data.frame, > > > library(reshape) > > library(ggplot2) > > > > df <- data.frame(x=c(1:10),y=sin(1:10),z=cos(1:10)) > > dfm<-melt(df, id=c("x"), measured=c("y","

Re: [R] ggplot / reshape: basic usage

2008-01-23 Thread John Kane
I don't understant what you're doing with the means calculation. Howvever if you want the standard errors ( your se function) then will this do what you want? df <- data.frame(x=c(1:10),y=sin(1:10),z=cos(1:10)); df dfm<-melt(df, id=c("x"), measured=c("y","z")); dfm se <- function(x) sd(x)/sqr

[R] ggplot / reshape: basic usage

2008-01-23 Thread baptiste Auguié
Hi, I've been trying to do the following simple thing: given a data.frame, > library(reshape) > library(ggplot2) > > df <- data.frame(x=c(1:10),y=sin(1:10),z=cos(1:10)) > dfm<-melt(df, id=c("x"), measured=c("y","z")) i want to plot y and z against x, and add vertical errorbars to the points