Visualize the proportion of keywords in the documents.
visualize_keywords(docs, keywords, prune = TRUE, label_size = 3.2)
a keyATM_docs object, generated by keyATM_read()
function
a list of keywords
logical. If TRUE
, prune keywords that do not appear in docs
. Default is TRUE
.
the size of keyword labels in the output plot. Default is 3.2
.
keyATM_fig object
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)
}