# NOT RUN {
## The following display takes a few seconds too many and will therefore not
## be run unless you type: example(isoscape, run.dontrun=TRUE)
# }
# NOT RUN {
data(elevraster)
data(Europefit)
data(countries)
data(oceanmask)
data(isopalette1)
## We crop the elevation raster to the extent of Europefit
elevationraster <- relevate(
elevation.raster=elevraster,
isofit=Europefit)
## We build the isoscape
isoscape <- isoscape(
elevation.raster=elevationraster,
isofit=Europefit)
isoscape
plot.mean <- plot(
x=isoscape,
which="mean",
borders=list(borders=countries),
mask=list(mask=oceanmask),
palette=isopalette1,
plot=FALSE)
plot.mean.predVar <- plot(
x=isoscape,
which="mean.predVar",
borders=list(borders=countries),
mask=list(mask=oceanmask),
palette=isopalette1,
plot=FALSE)
plot.mean.residVar <- plot(
x=isoscape,
which="mean.residVar",
borders=list(borders=countries),
mask=list(mask=oceanmask),
palette=isopalette1,
plot=FALSE)
plot.mean.respVar <- plot(
x=isoscape,
which="mean.respVar",
borders=list(borders=countries),
mask=list(mask=oceanmask),
palette=isopalette1,
plot=FALSE)
if(require(lattice)) {
print(plot.mean, split=c(1, 1, 2, 2), more=TRUE)
print(plot.mean.predVar, split=c(2, 1, 2, 2), more=TRUE)
print(plot.mean.residVar, split=c(1, 2, 2, 2), more=TRUE)
print(plot.mean.respVar, split=c(2, 2, 2, 2), more=FALSE)
}
plot.disp <- plot(
x=isoscape,
which="disp",
borders=list(borders=countries),
mask=list(mask=oceanmask),
palette=isopalette1,
plot=FALSE)
plot.disp.predVar <- plot(
x=isoscape,
which="disp.predVar",
borders=list(borders=countries),
mask=list(mask=oceanmask),
palette=isopalette1,
plot=FALSE)
plot.disp.residVar <- plot(
x=isoscape,
which="disp.residVar",
borders=list(borders=countries),
mask=list(mask=oceanmask),
palette=isopalette1,
plot=FALSE)
plot.disp.respVar <- plot(
x=isoscape,
which="disp.respVar",
borders=list(borders=countries),
mask=list(mask=oceanmask),
palette=isopalette1,
plot=FALSE)
if(require(lattice)) {
print(plot.disp, split=c(1, 1, 2, 2), more=TRUE)
print(plot.disp.predVar, split=c(2, 1, 2, 2), more=TRUE)
print(plot.disp.residVar, split=c(1, 2, 2, 2), more=TRUE)
print(plot.disp.respVar, split=c(2, 2, 2, 2), more=FALSE)
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab