plot.featureAssociations: visualize feature associations

View source: R/plot_words.r

plot.featureAssociationsR Documentation

visualize feature associations

Description

visualize feature associations

Usage

## S3 method for class 'featureAssociations'
plot(x, n = 25, size = c("chi2", "freq", "ratio"), ...)

Arguments

x

a featureAssociations object, created with the feature_associations function

n

the number of words in the plot

size

use "freq", "chi2" or "ratio" for determining the size of words

...

additional arguments passed to dtm_wordcloud

Examples

## as example, compare SOTU paragraphs about taxes to rest
tc = create_tcorpus(sotu_texts[1:100,], doc_column = 'id')
comp = compare_subset(tc, 'token', query_x = 'tax*')


plot(comp, balance=TRUE)
plot(comp, mode = 'ratio_x')
plot(comp, mode = 'ratio_y')


corpustools documentation built on May 31, 2023, 8:45 p.m.