我有这样的数据框:
V1 V2 LABEL
1 83965 891552 A
2 88599 891552 B
3 42966 891552 C
4 83965 891553 D
5 88599 891553 D
6 42966 891553 B
如何将其转换为邻接矩阵之类的东西,但是在我想要的列行的交叉点上,第三列值是这样的:
891552 891553
42966 C B
83965 A D
88599 B D
@Henrik
我得到了这样的错误。我认为这个段错误是由大数据引起的。
Using label as value column: use value.var to override.
Aggregation function missing: defaulting to length
*** caught segfault ***
address 0x7fff1e099a90, cause 'memory not mapped'
Traceback:
1: .Call("split_indices", group, as.integer(n))
2: split_indices(.group, .n)
3: vaggregate(.value = value, .group = overall, .fun = fun.aggregate, ..., .default = fill, .n = n)
4: cast(data, formula, fun.aggregate, ..., subset = subset, fill = fill, drop = drop, value.var = value.var)
5: dcast(dat, item ~ worker)
Any idead how it is possible to get rid of it?