View source: R/network-combine.R
| reduce_network | R Documentation |
Retain edges from a scored network using either a minimum score or a top-edge
rule. Source edge weights and identifier metadata are preserved, and the
returned object's manifest() records the filter and source provenance.
reduce_network(
net,
select = list(min_score = NULL, n_top = NULL, random = FALSE),
greedy = TRUE,
output_network_format = c("same", "igraph", "sparse", "legacy"),
case_sensitive = NULL
)
net |
A supported weighted network object. |
select |
Named selection list with |
greedy |
Boundary-tie policy used with |
output_network_format |
Output representation. |
case_sensitive |
Identifier case policy. By default, reuse the recorded
policy of |
A reduced network with a transformation provenance manifest.
merge_networks(), load_network_database(), manifest()
edges <- data.frame(from = c("A", "A", "B", "C"),
to = c("B", "C", "C", "D"), score = c(5, 4, 4, 2))
network <- import_network(edges, score_column = "score", species = NULL,
input_id_format = "custom", verbose = FALSE)
reduce_network(network, select = list(n_top = 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.