getLinks: Write an adjacency matrix to a 'data.frame'

View source: R/combine.R

getLinksR Documentation

Description

'getLinks' vectorizes a numerical square 'matrix' and writes the values and their corresponding ranks to a 'data.frame'.

Usage

getLinks(mat, exclude = "== 1", decreasing = TRUE)

Arguments

mat

matrix containing the values of confidence for a link

exclude

'character', logical statement as 'character' to set 'TRUE' values to NaN in 'mat', will be omitted if 'exclude = NULL'

decreasing

'logical', if 'TRUE', the highest confidence value will get the first rank, if 'FALSE', the lowest confidence value will get the first rank

Details

'getLinks' is a helper function used in the function 'threshold'.

Value

'data.frame' with entries 'row', 'col', 'confidence' and 'rank'

Author(s)

Thomas Naake, thomasnaake@googlemail.com

Examples

mat <- matrix(0:8, ncol = 3, nrow = 3)
MetNet:::getLinks(mat, exclude = "== 0", decreasing = TRUE)


tnaake/MetNet documentation built on Nov. 4, 2024, 4:45 a.m.