removeDup: Remove duplicated rows and columns

View source: R/auxiliar.R

removeDupR Documentation

Remove duplicated rows and columns

Description

Given the indices of the duplicated entries remove the columns and rows until just one is left, it keeps the duplicated with the highest absolute mean value.

Usage

removeDup(cor_mat, dupli)

Arguments

cor_mat

List of matrices

dupli

List of indices with duplicated entries

Value

A matrix with only one of the columns and rows duplicated

Author(s)

LluĂ­s Revilla

See Also

duplicateIndices() to obtain the list of indices with duplicated entries.

Examples

a <- seq2mat(c("52", "52", "53", "55"), runif(choose(4, 2)))
b <- seq2mat(c("52", "52", "53", "55"), runif(choose(4, 2)))
mat <- list("kegg" = a, "react" = b)
mat
dupli <- duplicateIndices(rownames(a))
remat <- removeDup(mat, dupli)
remat

llrs/BioCor documentation built on April 24, 2024, 5:50 p.m.