Skip to contents

Visualize graphs interactively (package visNetwork). The columns must be named: "from", "label", "to" and "value" (frequency of the triplet) OR the 1st, 2nd and 3rd columns will be taken as such.

Usage

plot_graph_i(graph_df, head_n = 20, nodesIdSelection = TRUE, height = "900px")

Arguments

graph_df

a dataframe with the graph data

nodesIdSelection

a boolean value to enable node selection. Default: TRUE.

Examples

x <- txt_wiki[2:44] |>
  filter_by_query("Brian") |>
  parsePOS()
g <- get_cooc_entities(x)
g$edges |>
  dplyr::rename(from = n1, to = n2) |>
  viz_graph()
#> Error in viz_graph(dplyr::rename(g$edges, from = n1, to = n2)): could not find function "viz_graph"
g$edges |> viz_graph()
#> Error in viz_graph(g$edges): could not find function "viz_graph"