How can I crop the data points which lie inside the given polygon?
library(tidyverse)
tbl <- tibble(x = runif(100),
y = runif(100))
ggplot(data = tbl,
aes(x = x,
y = y)) +
geom_point() +
theme_bw() +
coord_equal()
poly <- tibble(A = c(0.5, 0),
B = c(1, 0.5),
C = c(0.5, 1),
D = c(0, 0.5))
