doubles: Remove duplicate rows in a two-dimensional table.

View source: R/doubles.R

doublesR Documentation

Remove duplicate rows in a two-dimensional table.

Description

Recursive function.

Usage

doubles(x)

Arguments

x

A matrix of numeric, character or logical type.

Value

The submitted matrix with duplicated rows removed from.

Author(s)

Claude Boivin

Examples

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 Nov. 16, 2023, 5:08 p.m.