> In fact, my problem is to fit the data for every level of the f2 factor, > showing the levels of the f1 factor and that for several surveys . > Here's an example closer to my actual data :
Then maybe you want: qplot(x, y, . ~ surveys, data=df, type="line", colour=f1, id=f2, size=f2) (which doesn't produce a very nice legend) Or to build up piece by piece p <- ggplot(df, . ~ surveys, aes=list(x=x, y=y, colour=f1, id=f2)) p <- ggline(p) ggpoint(p, aes=list(shape=f2)) (you might want to flip shape and colour around to get what you want) Hadley ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
