Consider the following dataset:
data <- tibble(
group = rep(1:4, 40),
year = rep(1980:2019, 4),
col= rnorm(160)
)
I want to filter the data as such:
Obtain the subset where value in col is larger than zero for group 1 and 2 and smaller than zero for group 3 and 4