View source: R/filter_components.R
filter_components | R Documentation |
This function is deprecated and will be replaced by networkflow::extract_main_component()
.
This function which i) creates a tidygraph
graph using tbl_graph();
ii) keeps the main components of the graph, using main_components(); and iii) warns
the user if the first biggest component removed is too large.
filter_components( graphs, nb_components = 1, threshold_alert = 0.05, keep_component_columns = FALSE )
graphs |
A tibble graph from tidygraph, a list of tibble graphs or a data frame. |
nb_components |
By default, the function takes the main component of the graph ( |
threshold_alert |
If the biggest component after the last one selected (by default, nb_component = 1) gathers more than x% (by default, 5%) of the total number of nodes, the function triggers a warning to inform the user that he has removed a big component of the network. |
keep_component_columns |
Set to |
The function will automatically rename the first column of nodes as "Id".
The same tidygraph object or list of tidygraph objects with nodes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.