View source: R/site_species_subset.R
site_species_subset | R Documentation |
bioregion.clusters
objectThis function extracts a subset of nodes based on their type ("site"
or
"species"
) from a bioregion.clusters
object, which contains both types of
nodes (sites and species).
site_species_subset(clusters, node_type = "site")
clusters |
An object of class |
node_type |
A |
An object of class bioregion.clusters
containing only the specified
node type (sites or species).
Network clustering functions (prefixed with netclu_
) may return both types
of nodes (sites and species) when applied to bipartite networks (using the
bipartite
argument). In such cases, the type of nodes included in the
output can be specified with the return_node_type
argument. This function
allows you to extract a particular type of nodes (sites or species) from the
output and adjust the return_node_type
attribute accordingly.
Maxime Lenormand (maxime.lenormand@inrae.fr)
Pierre Denelle (pierre.denelle@gmail.com)
Boris Leroy (leroy.boris@gmail.com)
net <- data.frame(
Site = c(rep("A", 2), rep("B", 3), rep("C", 2)),
Species = c("a", "b", "a", "c", "d", "b", "d"),
Weight = c(10, 100, 1, 20, 50, 10, 20)
)
clusters <- netclu_louvain(net, lang = "igraph", bipartite = TRUE)
clusters_sites <- site_species_subset(clusters, node_type = "site")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.