[英]Finding value pairs that occur more than once in a data.table in R
我在R
有一个data.table
> head(d)
COUNT SAMPLE junction
1: 1 R1 tup
2: 1 R1 tup
3: 1 R1 tai
4: 1 R2 milt
5: 2 R3 Bsg25D
6: 1 R4 tutl
与维度
> dim(d)
[1] 1685992 3
现在我想找出在数据表中出现多次的对(SAMPLE,junction)。 例如,对(R1,tup)发生不止一次
你可以试试
library(data.table)
d[,.N>1 ,list(SAMPLE, junction)]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.