标签: r
我的原始目的地数据没有排序,想从中推断出一条路径。因此,我想添加一个包含“步数”的订单列。
以下数据表应包含A-B-A-C-D-E的路径:
DT_Test<-data.table(Origin=c("B","A","C","D","A"),Destination=c("A","C","D","E","B"),User=c("U56","U56","U56","U56","U56"))
目标:
是否有任何现有功能/程序包(在“用户”上附有声明)?