Skip to contents

Plot a network of co-ocurrence of terms. For more options, see `net_wordcloud()`.

Usage

q_plot(graph_list, color = "lightblue")

Arguments

color

color of the edges. Default: "lightblue".

edge_df

a dataframe of co-occurrence, extracted with `extract_graph()`

Examples

library(txtnet)
#> 
#> Attaching package: ‘txtnet’
#> The following objects are masked from ‘package:networds’:
#> 
#>     connectors, count_vec, entity_list_2_graph2, extract_entities_l,
#>     extract_entities_v, extract_entity, extract_graph,
#>     extract_graph_pos, extract_relation, filter_by_query, filter_ego,
#>     filter_ppn, g, get_cooc, get_cooc_entities, get_entities,
#>     get_graph_from_txt, get_neighbors, get_node_id, group_entities,
#>     group_ppn, group_seq_pos, interactive_graph, net_wordcloud,
#>     parsePOS, plot_graph2, plot_pos_graph, q_plot, rename_cols,
#>     split_graph, subs_ppn

g <- ex_txt_wiki[2:44] |>
  filter_by_query("Police") |>
  parsePOS()
#> Error: object 'ex_txt_wiki' not found
g <- get_cooc_entities(g)
#> Error in group_by(d_tmp, ..., .add = add): Must group by variables found in `.data`.
#>  Column `doc_id` is not found.
q_plot(g)
#> Error in tidygraph::as_tbl_graph(graph_list$edges): No support for <NULL> objects
#> Caused by error in `UseMethod()`:
#> ! no applicable method for 'as.igraph' applied to an object of class "NULL"