Compute log ratios for usage of tokens between two entities.

compute_logratios_facet_wide_at(data = NULL, token = NULL, facet = NULL,
  cnt_min = 10)

compute_logratios_facet_wide(data = NULL, token = NULL, facet = NULL,
  cnt_min = 10)

Arguments

data

data.frame.

token

bare for NSE; character for SE. Name of column in data to use for count.

facet

character. Name of column in data to use for facetting. It is set to NULL by default in the non-facet function even though it is not necessary. If specified with the non-facet version of the function, then the function acts just like the _facet version.

cnt_min

numeric. If not null, serves as a filter for which to compute log ratios.

Value

data.frame.

Details

Note that an attempt was made to make this function flexible enough, to consider a num_top or top_pct parameter that might be used if cnt_min = NULL, but this can be troublesome because do.call() does not seem to handle NULL in ....

See also

https://www.tidytextmining.com/twitter.html#comparing-token-usage. http://varianceexplained.org/r/trump-tweets/.