Binary logical operations (10)

Example 2: identifying the nc polygons that contain points from nc_points.

Notice the order of the arguments in st_intersects()!

inter <- st_intersects(nc_points, nc)
inter
## Sparse geometry binary predicate list of length 10, where the predicate
## was `intersects'
##  1: 69
##  2: 57
##  3: 40
##  4: 90
##  5: 5
##  6: 97
##  7: 9
##  8: 16
##  9: 94
##  10: 3
unlist(inter)
##  [1] 69 57 40 90  5 97  9 16 94  3