removeDup: Remove duplicated rows and columns

Description Usage Arguments Value Author(s) See Also Examples

View source: R/auxiliar.R

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

1
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<c3><ad>s Revilla

See Also

duplicateIndices to obtain the list of indices with duplicated entries.

Examples

1
2
3
4
5
6
7
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

Example output

$kegg
          52        52        53        55
52 1.0000000 0.3100798 0.7191100 0.7105538
52 0.3100798 1.0000000 0.5026317 0.6589491
53 0.7191100 0.5026317 1.0000000 0.3851072
55 0.7105538 0.6589491 0.3851072 1.0000000

$react
           52        52         53        55
52 1.00000000 0.8332751 0.06877862 0.2768116
52 0.83327508 1.0000000 0.56564450 0.4427168
53 0.06877862 0.5656445 1.00000000 0.5655267
55 0.27681164 0.4427168 0.56552665 1.0000000

$kegg
          52        53        55
52 1.0000000 0.7191100 0.7105538
53 0.7191100 1.0000000 0.3851072
55 0.7105538 0.3851072 1.0000000

$react
          52        53        55
52 1.0000000 0.5656445 0.4427168
53 0.5656445 1.0000000 0.5655267
55 0.4427168 0.5655267 1.0000000

BioCor documentation built on Nov. 8, 2020, 4:56 p.m.