u<- rnorm( 2000)
v<- rnorm( 2000)
x<- u
y<- .7*u + sqrt(1-.7**2)*v
look<- stats.bin( x,y)
look$stats["Std.Dev.",]
data( ozone2)
# make up a variogram day 16 of Midwest daily ozone ...
look<- vgram( ozone2$lon.lat, c(ozone2$y[16,]), lon.lat=TRUE)
# break points
brk<- seq( 0, 250,,40)
out<-stats.bin( look$d, look$vgram, breaks=brk)
# plot bin means, and some quantiles Q1, median, Q3
matplot( out$centers, t(out$stats[ c("mean", "median","Q1", "Q3"),]),
type="l",lty=c(1,2,2,2), col=c(3,4,3,4), ylab="ozone PPB")
Run the code above in your browser using DataLab