## RasterBrick of structural Essential Biodiversity Variables
## covering the extent of a location in the northern Amazon basin
## (Colombia) is imported:
path. <- system.file('amazon.grd',package = 'ecochange')
amazon <- brick(path.)
## Changes in layers of tree-canopy cover (TC) in the 'amazon'
## brick are computed:
def <- echanges(amazon, eco = 'TC',
change = 'lossyear',
eco_range = c(1,80),
get_unaffected = TRUE,
binary_output = FALSE,
mc.cores = 2)
plot.echanges(amazon)
## Function 'sampleIndicator' is implemented to sample a metric of
## conditional entropy (default):
def_condent <- sampleIndicator(def, side = 400, mc.cores = 2)
plot.echanges(def_condent, cex = 1.5)
Run the code above in your browser using DataLab