## Not run:
# library(zoo)
#
# url <- "ftp://ftp.wiley.com/public/sci_tech_med/spatio_temporal_data/"
# sst.dat = read.table(paste(url, "SST011970_032003.dat", sep=''), header = FALSE)
# sst.ll = read.table(paste(url, "SSTlonlat.dat", sep=''), header = FALSE)
#
# spSST <- SpatialPointsDataFrame(sst.ll, sst.dat)
# gridded(spSST) <- TRUE
# proj4string(spSST) = "+proj=longlat +datum=WGS84"
# SST <- brick(spSST)
#
# idx <- seq(as.Date('1970-01-01'), as.Date('2003-03-01'), by='month')
# idx <- as.yearmon(idx)
# SST <- setZ(SST, idx)
# names(SST) <- as.character(idx)
#
# horizonplot(SST)
#
# horizonplot(SST, stat='sd')
#
# ## Different scales for each panel, with colors representing deviations
# ## from the origin in *that* panel
# horizonplot(SST, scales=list('free'))
#
# ## origin may be a function...
# horizonplot(SST, origin=mean)
# ## ...or a number
# horizonplot(SST, origin=0)
#
# ## A different color palette
# horizonplot(SST, origin=0, col.regions=brewer.pal(n=6, 'PuOr'))
#
# ## The width of each color segment can be defined with horizonscale
# horizonplot(SST, horizonscale=1, origin=0)
# ## End(Not run)
## Not run:
#
#
# old <- getwd()
# ##change to your folder...
# setwd('CMSAF')
# listFich <- dir(pattern='2008')
# stackSIS <- stack(listFich)
# stackSIS <- stackSIS*24 ##from irradiance (W/m2) to irradiation Wh/m2
# setwd(old)
#
# idx <- seq(as.Date('2008-01-15'), as.Date('2008-12-15'), 'month')
#
# SISmm <- setZ(stackSIS, idx)
# names(SISmm) <- month.abb
#
# horizonplot(SISmm)
# ## End(Not run)
Run the code above in your browser using DataLab