rm.connections: Create ordered list of largest matrix elements

Description Usage Arguments Details Value Author(s) Examples

Description

The function creates a data frame which is sorted according to the (absolute) magnitude of the matrix elements.

Usage

1
 rm.connections(mat, nr.list = 30, abs.val = TRUE, fn = NULL)

Arguments

mat

Input matrix.

nr.list

Number of matrix elements to show.

abs.val

Logical variable determining if absolute values should be used for sorting.

fn

A file name. If not NULL, the data frame is saved to that file.

Details

This function can for instance be useful if pairs of samples with the largest correlation/mutual information are to be identified. By default, the matrix elements are sorted according to their absolute values. The list will not be saved if no filename is invoked, otherwise it will be saved to a tab-separated text file.

Value

A data frame containing the values of the largest nr.list matrix elements, together with the respective row- and column numbers. If present, the referring row- and column names are also included.

Author(s)

Uwe Menzel <uwemenzel@gmail.com>

Examples

1
2
3
4
5
6
7
8
set.seed(777)
random.mat <- create.rand.mat(size = 1000, distrib = "norm")$rand.matr
dim(random.mat)

## After identification of a proper threshold:
cleaned.matrix <- rm.denoise.mat(random.mat, threshold = 3.2, keep.diag = TRUE)	
cl2.matrix = rm.discard.zeros(cleaned.matrix)				 
df = rm.connections(cl2.matrix)  

RMThreshold documentation built on May 2, 2019, 8:51 a.m.