Professional Documents
Culture Documents
Lecture 1
Lecture 1
#install.packages("fields")
lon<- c(-116.7, -120.4, -116.7, -113.5, -115.5, -120.8, -119.5, -113.7, -113.7, -
110.7)
lat<- c(45.3, 42.6, 38.6, 42.1, 35.7, 38.9, 36.2, 39, 41.6, 36.9)
# locations
nloc<- length(x1)*length(y1)
locs<- expand.grid(x1,y1)
X11()
plot(locs)
##.....data.....
##setup a covariance function
X11()
par(mfrow=c(1,2))
image.plot(x1, y1, Y1, main="theta=2")
image.plot(x1, y1, Y, main="theta=7")
X11()
image.plot(x1, y1, Y, breaks= brks, col= col_pal, nlevel= length(brks)-1)