multidiv: Computes multidiversity estimates for land-use crop-cover...

Description Usage Arguments Value Examples

View source: R/multidiv.R

Description

Computes multidiversity estimates for land-use crop-cover rasters

Usage

1
2
3
4
multidiv(rfield = lu.plot[[1]][[2]], rcrop = lu.plot[[1]][[3]],
  rgreenedges = rbled[[1]], cereal = 1:8, snh_types = 133:164,
  exclude_field = 0, exclude_crop = c(100:199), cell.size = 25,
  widthgreenedges = 2, model = model3, core = TRUE, corewidth = 500)

Arguments

rfield

A raster containing identifier values for each agricultural field

rcrop

A raster containing the crop codes

rgreenedges

A raster or Rasterstack with values indicating the length in meters of green field edges of different widths.

cereal

A vector of numeric values indicating cereal crop codes - these are joined into one category as in Sirami et al.

snh_types

A vector of numeric values indicating semi-natural habitat types following Sirami et al.

exclude_field

A vector of identifier values to be considered as non-agricultural areas. Defaults to 0.

exclude_crop

A vector of crop codes to be considered as non-crop. Defaults to c(100:199).

cell.size

A number indicating the cell height/widht in meters. Defaults to 25.

widthgreenedges

A number or vector of numbers indicating the assumed width of green field edges in metres. Defaults to 2.

model

One of two final lmer models used in Sirami et al. (model3 or model5). Defaults to model3.

core

logical (TRUE/FALSE), indicates whether the core of the raster should be used in the computation.

corewidth

minimum distance from the centre point to the edge of the core, in units of the projection (usually metres).

Value

A list containing the estimates, the model call, and a data frame of the explanatory variables

Examples

1
2
3
4
5
# will not run, example for testing mutlidiv for Kirchweger et al. in prep.:
exampleoutput<-lapply(as.list(1:13),function(x) multidiv(rfield=struc.sz[[l]][[x]],rcrop=rall[[x]][[1]][[1]],
rgreenedges=stack(field.edges.sz[[l]][[x]][[2]],field.edges.sz[[l]][[x]][[3]]),
exclude_field=0,exclude_crop=c(100:199),snh_types=133:164,cereal=1:8,
cell.size=25,widthgreenedges=widthedges,model=mymodel,core=FALSE,corewidth=500))multidiv(rfield=lu.plot[[1]][[2]],rcrop=lu.plot[[1]][['lu10']],rgreenedges=rbled[[1]],exclude_field=c(0),exclude_crop=c(14),cell.size=25,widthgreenedges=2,model=model3,core=FALSE,corewidth=500)

yclough/ecodeal documentation built on May 14, 2019, 2:01 a.m.