重複サンプル
- "unique()"
- "duplicated()"
- 参考記事はこちら
- 2(以上)次元データでの重複除去の例
As<-c(1,2,3,4,1,2,3,4) Bs<-c(0,0,0,1,1,1,1,1) ABs<-cbind(As,Bs) ABs unique(ABs)
>ABs As Bs [1,] 1 0 [2,] 2 0 [3,] 3 0 [4,] 4 1 [5,] 1 1 [6,] 2 1 [7,] 3 1 [8,] 4 1 > unique(ABs) As Bs [1,] 1 0 [2,] 2 0 [3,] 3 0 [4,] 4 1 [5,] 1 1 [6,] 2 1 [7,] 3 1