View source: R/utils_spatial_misc.R
calculate_coverage | R Documentation |
Calculate how well a solution covers data.
calculate_coverage(x, data)
x |
|
data |
|
numeric
vector.
# load dependency
library(Matrix)
# simulate solution values for 10 planning units
solution_values <- sample(c(0, 1), 10, replace = TRUE)
# simulate data for 5 features in those 10 planning units
feature_data <- as(matrix(runif(10 * 5), ncol = 10), "dgCMatrix")
# calculate coverage
calculate_coverage(solution_values, feature_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.