定义一个索引,每次在r数据表中的某一列中找到相同值时该索引增加
我有一个如下所示的data.table: 例子 <- data.table(time = 1:30, A = c(rep("a", 5), rep("b", 5), rep("a", 5), r...