combine_ndfs: Combine multiple node data frames

Description Usage Arguments Value Examples

View source: R/combine_ndfs.R

Description

Combine several node data frames into a single node data frame.

Usage

1

Arguments

...

two or more node data frames, which contain node IDs and associated attributes.

Value

a combined node data frame.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Create two node data frames
node_df_1 <-
  create_node_df(
    n = 2,
    type = c("a", "b"),
    label = c("D", "Z"),
    value = c(8.4, 3.4))

node_df_2 <-
  create_node_df(
    n = 2,
    type = c("b", "c"),
    label = c("U", "A"),
    value = c(0.4, 3.4))

# Combine the ndfs using the
# `combine_ndfs()` function
node_df_combined <-
  combine_ndfs(
    node_df_1,
    node_df_2)

# Inspect the combined ndf
node_df_combined

DiagrammeR documentation built on March 18, 2018, 1:25 p.m.