[R] Help with lattice

Dieter Menne dieter.menne at menne-biomed.de
Thu Oct 23 17:29:08 CEST 2008


Nelson, Gary (FWE <Gary.Nelson <at> state.ma.us> writes:

> xyplot(Z~year|labels,group=as.factor(river),xlab="Year",ylab="Age-based
> Z", 
> 	data=data1,scales="free",ylim=c(0,4),xlim=c(1960,2010),
>       par.settings = list(superpose.symbol = list(pch =
> c(1,2,3,4,5,16,10,6,87,83),cex=0.9,
>            col="black")),    
>       panel=function (x,y,...){
>            panel.loess(x,y,...,span=0.75,degree=1,lwd=1.5,col="black")
>            panel.superpose (x,y,...)	
>                },
> auto.key = list(points = T,title="River",space="right",cex=0.8),
> main="Blueback",as.table=T,layout=c(2,2)
> )
> 

a) if (length(x) > 3)
     panel.loess

b) try(panel.loess(....), silent = TRUE)

Dieter



More information about the R-help mailing list