Closed JiaxiangBU closed 4 years ago
library(tidyverse) df <- mtcars %>% group_by(cyl) %>% nest() %>% mutate(x1 = map(data, ~ .$disp)) df df %>% mutate(if_condition = map2(cyl, x1, ~ .x < .y))