contemp_nds | R Documentation |
Find the connected component, or subgraph, of contemporaneous nodes (connected by normal and attribute edges) given a selected node and remove the other components.
contemp_nds(nds.df, eds.df, selected.nd)
nds.df |
dataframe of the nodes as the one obtained by the function |
eds.df |
dataframe of the edges as the one obtained by the function |
selected.nd |
The node of the decoration graph for which to extract the connected component. It can be either the node order (numeric) or the node name/id (character). |
A named list of two dataframes: list(nodes, edges)
, collecting the contemporaneous nodes and edges, respectivelly.
# Set data folder
dataDir <- system.file("extdata", package = "iconr")
# Read a decoration
nds.df <- read_nds(site = "Ibahernando",
decor = "Ibahernando",
dir = dataDir)
eds.df <- read_eds(site = "Ibahernando",
decor = "Ibahernando",
dir = dataDir)
l_dec_df <- contemp_nds(nds.df, eds.df, selected.nd = 2)
## It returns a list of two dataframes, one for nodes and one for edges:
l_dec_df
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.