I've just been trying some of the examples for DiagrameR and it looks like edge_aes and some other functions like edge_data are missing from the package. Is there another package I need to add?
The help viewer doesn't show these functions and, for example, the following produces an error saying edge_aes can't be found:
suppressPackageStartupMessages(library(DiagrammeR))
a_graph <-
create_graph(
directed = FALSE
) %>%
add_node(label="+") %>%
add_node(label="b") %>%
add_node(label="c") %>%
add_edge(
from = 1,
to = 2,
rel = "interacted_with",
edge_aes = edge_aes(
color = "red",
arrowhead = "vee",
tooltip = "Red Arrow") %>%
add_edge(from = 1, to = 3))
#> Error in edge_aes(color = "red", arrowhead = "vee", tooltip = "Red Arrow"): could not find function "edge_aes"
But the following works fine:
suppressPackageStartupMessages(library(DiagrammeR))
a_graph <-
create_graph(
directed = FALSE
) %>%
add_node(label="+") %>%
add_node(label="b") %>%
add_node(label="c") %>%
add_edge(
from = 1,
to = 2,
rel = "interacted_with") %>%
add_edge(from = 1, to = 3)
Thanks,
Dan