# Reproduce Lambert figure 39.
dat <- lambert.soiltemp
# Make 3 cycles of the data so that the loess line bends back up at
# month 1 and month 12
dat <- rbind(dat, transform(dat, month=month-12),
transform(dat, month=month+12))
xyplot(temp ~ month, dat, group=depth, type=c('p','smooth'),
xlim=c(-3,15), ylab="Soil temperature (du Crest) at depth (feet)",
span=.2, auto.key=list(columns=4))
# To do: Find a good model for this dataRun the code above in your browser using DataLab