Description Usage Arguments Details Value Examples
View source: R/remove_inner_relations.R
remove_inner_relations() removes all inner relations in a network - see examples for more...
1 | remove_inner_relations(graph_dt)
|
graph_dt |
data.table; A data.table with a "from", a "to" and a "level" column. See details for more. |
The function takes as its input a graph_dt from either get_parents() or get_children() with at least three columns called "from", "to" and "level" potentially many more.
It will return the inputted graph_dt data.table but with all inner relations removed. See examples.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | my_network <- data.table::data.table(
from = c("A", "B", "B", "C", "C", "E"),
to = c("B", "C", "D", "E", "B", "A")
)
# -------------------------------
my_children <- get_children(my_network, "A")
remove_inner_relations(my_children)
# -------------------------------
my_parents <- get_parents(my_network, "E")
remove_inner_relations(my_parents)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.