-1
我有下表,我需要输出如图所示。基本上,从第二排,第三排,第四排等减去"num_date"
列的第一行的值从第一行减去一个data.table中的第一行R
Table1:
Year num_date
2016 16703
2016 16705
2016 16706
2016 16708
.
.
Output:
Year num_date
2016 0
2016 2
2016 3
2016 5
有人可以帮我R中实现这一目标?
由于提前,