addToList: Add adjacency matrix to list

Description Usage Arguments Details Value Author(s) Examples

View source: R/statistical.R

Description

This helper function used in the function 'statistical' adds an adjacency matrix to a 'list' of adjacency matrices.

Usage

1
addToList(l, name, object)

Arguments

l

'list' of adjacency matrices

name

'character', name of added entry

object

'matrix' that will be added

Details

The function 'addToList' is a helper function used internally in 'statistical'.

Value

'list' containing the existing matrices and the added matrix

Author(s)

Thomas Naake, thomasnaake@googlemail.com

Examples

1
2
3
4
5
6
7
data("x_test", package = "MetNet")
x <- x_test[1:10, 3:ncol(x_test)]
x <- as.matrix(x)
cor_pearson <- correlation(x, type = "pearson")
cor_spearman <- correlation(x, type = "spearman")
l <- list(pearson = cor_pearson)
MetNet:::addToList(l, "spearman", cor_spearman)

MetNet documentation built on Nov. 8, 2020, 7:34 p.m.