doubles: Remove duplicate rows in a two-dimensional table

Description Usage Arguments Value Author(s) Examples

View source: R/doubles.R

Description

Remove duplicate rows in a two-dimensional table

Usage

1

Arguments

x

A matrix of numeric, character or logical type.

Value

The submitted matrix with duplicated rows removed from.

Author(s)

Claude Boivin, Stat.ASSQ

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
td0<-matrix(c(rep(c(1,0,1),times=3),0,0,1,1,1,1, 1,1,1),ncol=3,byrow=TRUE)
(doubles(td0))
td1<-matrix(c(rep(c(1,0,1),times=3),0,0,1,1,1,1),ncol=3,byrow=TRUE)
(doubles(td1))
td2<-matrix(c(1:3, 1:3,4:6,1:3),nrow=4,byrow=TRUE)
(doubles(td2))
td3<-matrix(c("d","e","f", rep(c("a","b","cc"),times=3),"g","h","i"),nrow=5,byrow=TRUE)
(doubles(td3))
td4<-matrix(as.logical(td1),nrow=5,byrow=TRUE)
(doubles(td4))

dst documentation built on April 26, 2018, 1:03 a.m.