Description Usage Arguments Details Value References Examples
A range of functions to calculate well known landcover diversity metrics
1 2 3 4 5 6 7 8 9 10 11 |
x |
numeric, winmove. The data over which to calculate the diversity metrics |
lc_class |
numeric. The class values to include in the diversity metric calculation |
d |
numeric. If |
type |
character. The shape of the moving window |
... |
further arguments passed to or from other methods |
Currently provided diversity metrics are Shannon diversity and Shannon evenness. Open a new issue (https://github.com/laurajanegraham/grainchanger/issues) to request additional diversity metrics.
If class(x) == "winmove"
, a smoothed raster with the diversity
metric calculated within the specified moving window
If class(x) == "numeric"
, a single value representing the diversity metric in
x
McGarigal, K. and Marks, B.J., 1995. FRAGSTATS: spatial pattern analysis program for quantifying landscape structure. Gen. Tech. Rep. PNW-GTR-351. Portland, OR: US Department of Agriculture, Forest Service, Pacific Northwest Research Station. 122 p, 351.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # load required data
data(cat_ls)
# convert data to object of class winmove
cat_ls <- new("winmove", cat_ls)
# calculate Shannon diversity in a rectangular window of dimension 5
d <- shdi(cat_ls, d = 5, type = "rectangle", lc_class = 1:4)
# convert data to object of class numeric
cat_ls <- raster::values(cat_ls)
# calculate Shannon evenness
d <- shei(cat_ls, lc_class = 1:4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.