rmDupl2colMatr: Remove Lines Of Matrix Redundant /Duplicated For 1st And 2nd...

View source: R/rmDupl2colMatr.R

rmDupl2colMatrR Documentation

Remove Lines Of Matrix Redundant /Duplicated For 1st And 2nd Column

Description

This function removes lines of matrix that are redundant /duplicated for 1st and 2nd column (irrespective of content of their columns). The first occurance of redundant /duplicated elements is kept.

Usage

rmDupl2colMatr(
  mat,
  useCol = c(1, 2),
  silent = FALSE,
  debug = FALSE,
  callFrom = NULL
)

Arguments

mat

(matrix or data.frame) main input

useCol

(integer, length=2) columns to consider/use when looking for duplicated entries

silent

(logical) suppress messages

debug

(logical) additional messages for debugging

callFrom

(character) allow easier tracking of messages produced

Value

This function returns a matrix where duplictaed lines are removed

See Also

unlist

Examples

mat <- matrix(1:12,ncol=3)
mat[3,1:2] <- mat[1,1:2]
rmDupl2colMatr(mat)

wrMisc documentation built on March 9, 2026, 5:07 p.m.