compute_corrs: Compute correlations

Description Usage Arguments Details Value See Also

Description

Compute correlations among pairs of words.

Usage

1
2
3
4
5
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)

Arguments

data

data.frame.

token

bare for NSE; character for SE. Name of column in data to use as item in widyr::pairwise_cor().

feature

bare for NSE; character for SE. Name of column in data to use as feature in widyr::pairwise_cor().

num_top_ngrams

numeric. Useful primarily to prevent widyr::pairwise_cor() from hanging up. If between 0 and 1, then interpreted as a percentage.

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 num_top_ngrams and num_top_corrs (if they are between 0 and 1) to the count of unique words. Is is likely that the input percentage values are specified with the number of words in mind.

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 visualize_time().

Details

Calls widyr::pairwise_cor() internally.

Value

data.frame.

See Also

http://varianceexplained.org/r/seven-fav-packages/.


tonyelhabr/tetext documentation built on May 14, 2019, 8:03 a.m.