【发布时间】:2023-01-09 23:21:13
【问题描述】:
我想使用 R 来识别首次满足条件的时间并忽略后续更改。示例数据:
df <- data.frame(response = c(1, 1, 1, 0, 1, 0))
注意:第一个响应总是以 1 开头。
预期产出
f <- data.frame(response = c(1, 1, 1, 0, 1, 0), Threshold = c("no", "no", "no", "yes", "no", "no"))
【问题讨论】:
标签: r