Add new column with values looping through a vector every time the value of a reference column change

前端 未结 0 1177
梦谈多话
梦谈多话 2021-02-07 00:54

My data:

ID  B

1   1
2   1
3  -1
4  -1
5  -1
6   1
7   1

I would like to create a column C that the value loops through c(1.0, 1.5, 2.0, 2.5) w

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