If 1 appears, all subsequent elements of the variable must be 1, grouped by subject

后端 未结 0 529
野趣味
野趣味 2021-01-12 05:08

I want make from:

test <- data.frame(subject=c(rep(1,10),rep(2,10)),x=1:10,y=0:1)

Something like that:

As I wrote i

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