network_rescale: Rescaling function customized for adjacency matrices

network_rescaleR Documentation

Rescaling function customized for adjacency matrices

Description

This function rescales to a 0 to 100 scale using the values present in the matrix. It is based on the rescale function of the scales package. It will make the matrix symmetric by mirroring the upper half if it isn't. If negative values present, their absolute value will be taken.

Usage

network_rescale(adj_mat, to = c(0, 100), print_message = TRUE)

Arguments

adj_mat

an adjacency matrix to normalize.

to

interval in which transformation should be done. Default is to = c(0, 100).

print_message

a logical value indicating whether or not a re-scaling message shall be printed.

Author(s)

Sergio Vasquez and Hajk-Georg Drost

Examples

# path to ppcor output file
ppcor_output <- system.file('beeline_examples/PPCOR/outFile.txt', package = 'edgynode')
# parsing the output to an adjacency matrix
ppcor_parsed <- ppcor(ppcor_output)
# rescaling the matrix
rescaled <- network_rescale(ppcor_parsed)
# Visualize result
head(rescaled)

drostlab/edgynode documentation built on March 29, 2024, 10:36 a.m.