Closed dbaston closed 2 years ago
A candidate version of this is available via remotes::install_git("https://gitlab.com/isciences/exactextractr", ref="add-frac")
, which adds the summary operations frac
and weighted_frac
. I did some limited testing and it seems somewhat faster than the dplyr
alternative demonstrated in the second vignette. It should certainly be more memory-efficient. The frac
columns are added in "wide" form. I thought about long form, but that seemed awkward in the case where you are combining frac
stats with others such as count
.
Implemented with 86f0be0439c335f97140aa0acfd192401de7917d
Provide a simplified means of summarizing the fraction of each polygon that is covered by a given raster value, i.e. a shortcut to the code shown in https://isciences.gitlab.io/exactextractr/articles/vig2_categorical.html#summary-functions