Compute correlations among pairs of words.
compute_corrs_at(data = NULL, token = NULL, feature = NULL, num_top_ngrams = 50, num_top_corrs = 50, adjust = FALSE, return_corrs = TRUE, return_words = FALSE, return_both = FALSE) compute_corrs(..., token, feature)
data | data.frame. |
---|---|
token | bare for NSE; character for SE. Name of column in |
feature | bare for NSE; character for SE. Name of column in |
num_top_ngrams | numeric. Useful primarily to prevent |
num_top_corrs | numeric. Useful primarily to limit input to a network visualation. does not hang up. If between 0 and 1, then interpreted as a percentage. |
adjust | logical. Indicates whether or not to scale |
return_corrs | logical. Whether to return just the correlations and token pairs, but not the token counts. This is the default option. |
return_words | logical. Whether to return the counts used to compute the correlations. Useful when creating a network visualization. |
return_both | logical. Useful when creating a network visualization so that words can be used as nodes and correlations can be used weights. |
... | dots. Parameters to pass directly to |
data.frame.
Calls widyr::pairwise_cor()
internally.