Re: [R] Obtaining lattice equivalent smoothed (loess) plot in ggplot

2010-09-29 Thread Dennis Murphy
ttice code# > p <- ggplot(dd, aes(x=X1,y=X3,group=X2))p <-p + geom_smooth(method = > "loess",se=FALSE, lty=2,lwd=1)p + geom_line(aes(col=X2)) > > I have the plot above in Lattice, but would like to get a ggplot2 plot for > a presentation (i.e. it just looks nice). (I a

Re: [R] Obtaining lattice equivalent smoothed (loess) plot in ggplot

2010-09-29 Thread A Herath
s(col=X2))  I have the plot above in Lattice, but would like to get a ggplot2 plot for a presentation (i.e. it just looks nice). (I am not sure whether somebody would set something like this for a home work assignment). Cham. > Date: Wed, 29 Sep 2010 14:19:42

Re: [R] Obtaining lattice equivalent smoothed (loess) plot in ggplot

2010-09-29 Thread Dennis Murphy
Hi: There's no way you could produce a loess plot based on the data supplied below. V1, your purported x-variable, is a factor; moreover, you have one point per V1 * V2 factor combination. (BTW, you might also consider using the carriage return when demarcating individual lines of code.) The reas

[R] Obtaining lattice equivalent smoothed (loess) plot in ggplot

2010-09-29 Thread A Herath
Hello, I have been struggling to do a plot in ggplot(2) that's of lattice equivalent. The following code shows the lattice plot. dd<-rbind(data.frame(rbind(c("V1","A",0.3),c("V2","A",0.5),c("V3","A",0.2))),data.frame(rbind(c("V1","B",0.3),c("V2","B",0.4),c("V3","B",0.8))),data.frame(rbind(c("V1"