landscape <- terra::rast(landscapemetrics::landscape)
landscape_mat <- terra::as.matrix(landscape, wide = TRUE)
prepare_extras("lsm_l_ent", landscape_mat, neighbourhood = 4, base = "log2")
if (FALSE) {
metrics = list_lsm()$function_name
landscape <- terra::rast(landscapemetrics::landscape)
landscape_mat <- terra::as.matrix(landscape, wide = TRUE)
prepare_extras(metrics, landscape_mat, directions = 8, neighbourhood = 4,
ordered = FALSE, base = "log2", resolution = terra::res(landscape))
}
Run the code above in your browser using DataLab