Learn R Programming

IsoriX (version 0.7)

isomultiscape: Predicts the average spatial distribution of isotopic values over months, years...

Description

This function is the counterpart of isoscape for the objects created with isomultifit. It creates the isoscapes for each strata (e.g. month) defined by split.by during the call to isomultifit and the aggregate them. The function can handle weighting for the aggregation process and can thus be used to predict annual averages precipitation weighted isoscapes.

Usage

isomultiscape(elevation.raster, isofit, weighting = NULL,
  verbose = interactive())

Arguments

elevation.raster

The elevation raster (RasterLayer) created by relevate

isofit

The fitted isoscape created by isofit

weighting

An optional RasterBrick containing the weights #' @return This function returns a list of class isoscape containing a stack of all 8 raster layers mentioned above (all being of class RasterLayer), and the location of the sources as spatial points.

verbose

A logical indicating whether information about the progress of the procedure should be displayed or not while the function is running. By default verbose is TRUE if users use an interactive R session and FALSE otherwise.

See Also

isoscape for details on the function used to compute the isoscapes for each strata isofit for the function fitting the isoscape

plot.isoscape for the function plotting the isoscape model

plot.isoscape for the function plotting the isoscape model

IsoriX for the complete work-flow

Examples

Run this code
# NOT RUN {
## The examples below will only be run if sufficient time is allowed
## You can change that by typing e.g. IsoriX.options(example_maxtime = XX)
## if you want to allow for examples taking up to ca. XX seconds to run
## (so don't write XX but put a number instead!)

if(IsoriX.getOption("example_maxtime") > 180) {

## We prepare the data and split them by month:

GNIPDataDEmonthly <- prepdata(data = GNIPDataDE,
                              split.by = "month")

dim(GNIPDataDEmonthly)

## We fit the isoscapes:#' 
isoscapemodels <- isomultifit(iso.data = GNIPDataDEmonthly,
                              mean.model.fix = list(elev = TRUE, lat.abs = TRUE))

## We build the annual isoscapes by simple averaging (equal weighting):
isoscapes <- isomultiscape(elevation.raster = ElevRasterDE,
                           isofit = isoscapemodels)

## We plot the mean isoscape of the averaging:
plot(x = isoscapes, which = "mean")

## We build the isoscapes for a given month (here January):
isoscape.jan <- isoscape(elevation.raster = ElevRasterDE,
                         isofit = isoscapemodels$multi.fits[["month_1"]])
                         
## We plot the mean isoscape for January:
plot(x = isoscape.jan, which = "mean")

}
# }

Run the code above in your browser using DataLab