Skip to contents

Calculates the percent or proportion of y (e.g. bioregion) that is spatially covered by x (e.g. protected areas)

Usage

ind_coverage(x, y, intersection = FALSE, proportion = FALSE)

Arguments

x

sf polygon whose area acts as the numerator in the fraction (e.g. protected areas)

y

sf polygon whose area acts as the denominator in the fraction (e.g. bioregion)

intersection

logical that determines if the area of the spatial intersection of x and y should be used as the numerator (TRUE) or, by default, if the area of x should be used as the numerator.

proportion

Logical that determines if this function returns a proportion (TRUE) or, by default (FALSE), a percentage (i.e. proportion X 100)

Value

numeric

Examples

if (FALSE) { # \dontrun{
require(MarConsNetData)
bioregion <- data_bioregion()
areas <- data_bioregion()
ind_coverage(x=areas, y=bioregion)
} # }