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
viz_triplets_i(
graph_df,
nodesIdSelection = TRUE,
height = "900px",
edge_color = "blue",
node_size = 4,
head_n = 20
)Examples
x <- ex_txt_wiki[2:44] |>
filter_by_query("Brian") |>
parsePOS()
#> Error: object 'ex_txt_wiki' not found
g <- get_cooc_entities(x)
g$edges |>
dplyr::rename(from = n1, to = n2) |>
viz_triplets_i()
#> Error in UseMethod("rename"): no applicable method for 'rename' applied to an object of class "NULL"
g$edges |> viz_triplets_i()
#> Error in `colnames<-`(`*tmp*`, value = c("from", "to", "value")): attempt to set 'colnames' on an object with less than two dimensions