case_when within filter for layered logic across columns In R, trying to implement the following filtering logic by group on a large dataset: