Description Usage Arguments See Also Examples
Use filters to find rows of the return objects from many textstat_*()
functions where conditions are true, including matches to features using
"glob"
, "regex"
or "fixed"
patterns.
1 2 3 4 5 6 7 8 |
.data |
a |
... |
filter conditions passed to dplyr |
pattern |
a character vector, list of character vectors, dictionary, or collocations object. See pattern for details. |
valuetype |
the type of pattern matching: |
case_insensitive |
ignore case when matching, if |
quanteda.textstats::textstat_collocations()
,
quanteda.textstats::textstat_keyness()
,
quanteda.textstats::textstat_frequency()
1 2 3 4 5 6 7 8 9 | period <- ifelse(docvars(data_corpus_inaugural, "Year") < 1945,
"pre-war", "post-war")
mydfm <- tokens(data_corpus_inaugural) %>%
dfm() %>%
dfm_group(groups = period)
keyness <- quanteda.textstats::textstat_keyness(mydfm)
filter(keyness, pattern = "america*")
filter(keyness, p < .00001, pattern = "america*")
filter(keyness, p < .00001) %>% head()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.