unroll: Expresses a square numeric matrix as a list of position...

View source: R/utility.R

unrollR Documentation

Expresses a square numeric matrix as a list of position indices and values

Description

Converts a square matrix or numeric data.frame to a the list of all values described with respect to the position of the indices. If are present present rows and cols names the information are adds like additional columns.

Usage

unroll(X, diag = FALSE, sparse = TRUE, symmetric = TRUE)

Arguments

X

matrix or data.frame

diag

includes or not include the diagonal

sparse

removes zero values

symmetric

if true select only the upper triangular values


Fuschi/MetaGenomicR documentation built on Sept. 5, 2022, 5:23 a.m.