Restricts environmental variable values to the range observed during training. Values below min are set to min, values above max are set to max. A clamping grid records the total absolute clamping at each cell.
Value
A named list with:
- clamped_grids
List of external pointers to clamped grids
- clamp_grid
External pointer to clamping magnitude grid
Examples
# \donttest{
g1 <- maxent_grid_from_matrix(matrix(runif(50), 5, 10),
-120, 35, 1, name = "temp")
g2 <- maxent_grid_from_matrix(matrix(runif(50, 50, 200), 5, 10),
-120, 35, 1, name = "precip")
result <- maxent_clamp(list(g1, g2), c(0, 50), c(30, 200))
clamped <- result$clamped_grids
clamp_mat <- maxent_grid_to_matrix(result$clamp_grid)
# }