make_binary: Convert a numeric matrix generated with 'make_adjacency' into...

View source: R/make_binary.R

make_binaryR Documentation

Convert a numeric matrix generated with make_adjacency into a binary matrix

Description

This function takes an adjacency matrix generated with make_adjacency as input and converts it to a binary matrix using a binarization threshold.

Usage

make_binary(adj, threshold, output_plot = FALSE)

Arguments

adj

an adjacency matrix converted from a raw input matrix via make_adjacency.

threshold

a numeric value that is within the range min(adj) < threshold <= max(adj) of the input which is then used for binarisation.

Author(s)

Ilias Moutsopoulos and Hajk-Georg Drost

Examples

# look at raw matrix
edgynode::adjacency_matrix_test_3
# convert raw matrix into a edgynode adjacency matrix
edgynode_matrix <- edgynode::make_adjacency(edgynode::adjacency_matrix_test_3)
# convert into a binary matrix
edgynode_matrix_binary <- edgynode::make_binary(edgynode_matrix, threshold = 1)
# look at result
edgynode_matrix_binary

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