I am trying to add several loess line to each panel in lattice plot. Each loess line represent the different level of Spe column. Here is the link the my data set:
https://gist.github.com/plxsas/4756fc8d8e50f62acf4d
Would you be able to help me, please?
my.col1<- c("white", "darkgray", "black", "lightgray", "ivory2")
my.col2<- c("white", "darkgray", "black", "lightgray", "ivory2")
labels<- c("H", "A", "E", "Q", "T")
xyplot(Total~Months|Site,data=data, groups=Spe, layout=c(3,1), index.cond=list(c(1,2,3)),
par.settings = list(superpose.polygon = list(col=c(my.col1, my.col2))), superpose.line=list(col=c(my.col1, my.col2)),
ylab="Individuals", xlab="Months",
scales=list(x=list(rot=90, alternating=1,labels=c("Jan-12", "Feb-12", "Mar-12", "Apr-12", "May-12", "Jun-12",
"Jul-12", "Aug-12", "Sep-12", "Oct-12", "Nov-12", "Dec-12", "Jan-13"))),
auto.key=list(space="top", columns=3, cex=.8,between.columns = 1,font=3,
rectangles=FALSE, points=TRUE, labels=labels),
panel = function(x, y, ...){
panel.xyplot(x, y, ...)
panel.loess(x, y, span = 1/2)
})