View source: R/decoupleRnival.R
meta_network_cleanup | R Documentation |
This function cleans up a meta network data frame by removing self-interactions, calculating the mean interaction values for duplicated source-target pairs, and keeping only interactions with values of 1 or -1.
meta_network_cleanup(meta_network)
meta_network |
A data frame with columns 'source', 'interaction', and 'target'. |
A cleaned up meta network data frame.
# Create a meta network data frame
example_meta_network <- data.frame(
source = c("A", "B", "C", "D", "A", "B", "C", "D", "A"),
interaction = c(1, 1, 1, -1, 1, -1, 1, -1, 1),
target = c("B", "C", "D", "A", "C", "D", "A", "B", "B")
)
# Clean up the example meta network
cleaned_meta_network <- meta_network_cleanup(example_meta_network)
print(cleaned_meta_network)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.