Visualize the proportion of keywords in the documents.

visualize_keywords(docs, keywords, prune = TRUE, label_size = 3.2)

Arguments

docs

a keyATM_docs object, generated by keyATM_read() function

keywords

a list of keywords

prune

logical. If TRUE, prune keywords that do not appear in docs. Default is TRUE.

label_size

the size of keyword labels in the output plot. Default is 3.2.

Value

keyATM_fig object

See also

Examples

if (FALSE) {
 # Prepare a keyATM_docs object
 keyATM_docs <- keyATM_read(input)

 # Keywords are in a list
 keywords <- list(Education = c("education", "child", "student"),
                  Health    = c("public", "health", "program"))

 # Visualize keywords
 keyATM_viz <- visualize_keywords(keyATM_docs, keywords)

 # View a figure
 keyATM_viz

 # Save a figure
 save_fig(keyATM_viz, filename)
}