How to find overlapping polygons

Hi RStudio community,

I am trying to find species distribution polygons that are overlapping (with percentage of overlap) within a shapefile (species_combined.shp), then using a threat/species binary matrix (threats_species_matrix.csv), I want to find which overlapping species also have the same threats. Does anyone know how to write this in R?

sf::st_overlaps could do the bulk of the work for you. sf has a nice vignette with lots of examples that is worth checking out.


Thanks so much, I'll try it now.