Hello All,
I am trying to do the comparison of my observed and modeled data sets for
two stations. One station is called station "red" and another is
called
"blue". I was able to create the facets but when I tried to add two
series
in one facet then only one facet got updated while other didn't.
The data watersurf1.csv can be downloaded from
https://www.dropbox.com/s/ainioj2nn47sis4/watersurf1.csv
The output I got can be found on
https://www.dropbox.com/s/a6d13bkjiu7uy2q/facet%202%20subplots.png
The code I used is as follows:
watersurf <-
read.table("watersurf1.csv",sep=",",header=TRUE)
watersurf[1:100,]
ggplot(data=watersurf,aes(x=time,y=data))+geom_line()+facet_wrap(~id)
watersurf$coupleid <- factor(rep(unlist(by(watersurf$id,watersurf$group,
function(x)
{ave(as.numeric(unique(x)),FUN=seq_along)}
)),each=6239))
p <-
ggplot(data=watersurf,aes(x=time,y=data,group=id))+geom_line(aes(linetype=group1),size=1)+facet_wrap(~coupleid)
p
Is it also possible to add third series in the graph but of unequal length
i.e not same interval ?
Thanks.
Best Regards,
Janesh Devkota
[[alternative HTML version deleted]]