addToList {MetNet} | R Documentation

## Add adjacency matrix to list

### Description

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

### Usage

    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

    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)

[Package MetNet version 1.4.2 Index]