library(tricky) library(tibble)
Suppose we have a dataset with for each row the name of a node and the name of a group it belongs to. We want to have a dataset with all relationships between nodes (ie if A and B belong to the group a, they have one relationship.)
make_single_node_node_table_
makes a table with one row for each relationship for a single node. make_node_node_table_
makes a table with one row for each relationship for all nodestoy_data <- tibble::tibble( node = c("A", "B", "C", "A", "B"), link = c("a", "a", "b", "b", "b") ) toy_data
library(tricky) make_single_node_node_table_( .data = toy_data, .id = "A", node = "node", link = "link" )
library(tricky) make_node_node_table_( .data = toy_data, node = "node", link = "link" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.