Select rows of textstat objects by glob, regex or fixed patterns
Users can subset output object of textstat_collocations
,
textstat_keyness
or textstat_frequency
based on
"glob"
, "regex"
or "fixed"
patterns using this method.
textstat_select( x, pattern = NULL, selection = c("keep", "remove"), valuetype = c("glob", "regex", "fixed"), case_insensitive = TRUE )
x |
a |
pattern |
|
selection |
whether to |
valuetype |
the type of pattern matching: |
case_insensitive |
logical; if |
library("quanteda") period <- ifelse(docvars(data_corpus_inaugural, "Year") < 1945, "pre-war", "post-war") dfmat <- tokens(data_corpus_inaugural) %>% dfm() %>% dfm_group(groups = period) tstat <- textstat_keyness(dfmat) textstat_select(tstat, 'america*')
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.