#' Create a dataframe listing nodes and details of how they connect to other nodes
#'
#' Creates a df of unique nodes and vertices combinations. For example, it might list all team members/nodes working on projects, connected via a project ID.
#'
#' @param data Dataframe holding the information you'd like to reformat
#' @param node_col The \code{data} column containing identifiers for nodes
#' @param connect_col The \code{data} column containing the ids of objects connecting nodes, for example, project IDs, locations, mentees
#' @return A dataframe containign details of connections between nodes via 'connecting objects'.
#' @export
make_connections <- function(
data,
node_col,
connect_col
) {
data %>%
dplyr::distinct({{node_col}}, {{connect_col}}) %>%
dplyr::mutate(node_number = match({{node_col}}, unique({{node_col}})))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.