Learn R Programming

finnsurveytext (version 2.1.1)

fst_cn_plot: Plot Concept Network

Description

Creates a Concept Network plot from a list of edges and nodes (and their respective weights).

Usage

fst_cn_plot(edges, nodes, concepts, title = NULL)

Value

Plot of Concept Network.

Arguments

edges

Output of `fst_cn_edges()`, dataframe of 'edges' connecting two words.

nodes

Output of `fst_cn_nodes()`, dataframe of relevant lemmas and their associated pagerank.

concepts

List of terms which have been searched for, separated by commas.

title

Optional title for plot, default is `NULL` and a generic title ("TextRank extracted keyword occurrences") will be used.

Examples

Run this code
con <- "kiusata, lyöminen"
cb <- fst_child
edges <- fst_cn_edges(cb, con, pos_filter = c("NOUN", "VERB", "ADJ", "ADV"))
nodes <- fst_cn_nodes(cb, edges, c("NOUN", "VERB", "ADJ", "ADV"))
fst_cn_plot(edges = edges, nodes = nodes, concepts = con)

Run the code above in your browser using DataLab