We regularly cross two datasets and there will be multiple coverage or probabilities for a given PU and we need to select the highest one. We have used this code in the Med and in the Coral Triangle.
dplyr::group_by(cellID) %>%
dplyr::mutate(eez = eez[which.max(eez_pres)],
eez_prop = eez_pres[which.max(eez_pres)]) %>%
ungroup %>%
dplyr::select(cellID, eez) %>%
distinct()
Possibly create a splnr_ function from this.
We regularly cross two datasets and there will be multiple coverage or probabilities for a given PU and we need to select the highest one. We have used this code in the Med and in the Coral Triangle.
Possibly create a
splnr_function from this.