network_make_binary: Matrix convert to binary

network_make_binaryR Documentation

Matrix convert to binary

Description

This function takes a weighted adjacency matrix and created a binary adjacency matrix, filtering the unsignificant edges, if specified

Usage

network_make_binary(
  adj_mat,
  threshold = NULL,
  print_message = TRUE,
  filtered = FALSE
)

Arguments

adj_mat

adjacency matrix to be converted.

threshold

relevant only for not-prefiltered input matrix. If not specified, the function will filter based on the disparity measure (Neal, Z.P. (2022). backbone: An R package to extract network backbones) (recommended). If you want to specify threshold, we recommend to use network_rescale before using this function. Re-scaling will transform all values into a range [0,100]. The threshold should be a numeric value in the interval [0,100]

print_message

a logical value indicating whether or not a threshold message shall be printed.

filtered

a logical value indicating whether the input adjacency network has been already prefiltered and thus no more edges should be removed

Author(s)

Sergio Vasquez, Hajk-Georg Drost and Nikola Kalábová

Examples

 # path to PPCOR output file
ppcor_output <- system.file('beeline_examples/PPCOR/outFile.txt', package = 'edgynode')
 # import PPCOR specific output
ppcor_parsed <- ppcor(ppcor_output)
 # rescale the matrix
ppcor_rescaled <- network_rescale(ppcor_parsed)
 # make the binary matrix
ppcor_binary <- network_make_binary(ppcor_rescaled, 70)
 # to see the differences you may use:
 plot_network_dendrogram(ppcor_rescaled)
 plot_network_dendrogram(ppcor_binary)

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