Finding position where the next value is larger

前端 未结 0 1101
北荒
北荒 2020-12-21 10:32

I have a data set df, I have a code
df1 <- df %>% summarise(across(.fns = ~max(which(.x == min(.x[which(lag(.x) == .x & lead(.x) > .x)])), 1)))

相关标签:
回答
  • 消灭零回复
提交回复
热议问题