randomize_network: Randomize a network

View source: R/construct_random_networks.R

randomize_networkR Documentation

Randomize a network

Description

randomize_network Randomizes a network of interest by edge swapping to preserve the degree of the nodes

Usage

randomize_network(network,output_weighted = FALSE)

Arguments

network

A data frame / tibble containing gene-gene interactions (required columns: $from, $to)

output_weighted

Indicate whether the output network should be made weighted by assigning a weight of 1 to each interaction.

Value

A randomized network ($from, $to; and $weight = 1 if output_weighted == TRUE).

Examples

## Not run: 
random_lr = randomize_network(lr_network)

## End(Not run)


saeyslab/nichenetr documentation built on April 27, 2024, 9:24 p.m.