Running examples in ‘quanteda.textstats-Ex.R’ failed
The error most likely occurred in:

> ### Name: textstat_frequency
> ### Title: Tabulate feature frequencies
> ### Aliases: textstat_frequency
> ### Keywords: plot
> 
> ### ** Examples
> 
> library("quanteda")
Package version: 2.1.2
Parallel computing: 2 of 8 threads used.
See https://quanteda.io for tutorials and examples.

Attaching package: ‘quanteda’

The following objects are masked from ‘package:quanteda.textstats’:

    nscrabble, textstat_collocations, textstat_dist, textstat_entropy,
    textstat_frequency, textstat_keyness, textstat_lexdiv,
    textstat_proxy, textstat_readability, textstat_select,
    textstat_simil, textstat_summary

The following object is masked from ‘package:utils’:

    View

> set.seed(20)
> dfmat1 <- dfm(tokens(c("a a b b c d", "a d d d", "a a a")))
> 
> textstat_frequency(dfmat1)
  feature frequency rank docfreq group
1       a         6    1       3   all
2       d         4    2       2   all
3       b         2    3       1   all
4       c         1    4       1   all
> textstat_frequency(dfmat1, groups = c("one", "two", "one"), ties_method = "first")
  feature frequency rank docfreq group
1       a         5    1       2   one
2       b         2    2       1   one
3       c         1    3       1   one
4       d         1    4       1   one
5       d         3    1       1   two
6       a         1    2       1   two
> textstat_frequency(dfmat1, groups = c("one", "two", "one"), ties_method = "average")
  feature frequency rank docfreq group
1       a         5  1.0       2   one
2       b         2  2.0       1   one
3       c         1  3.5       1   one
4       d         1  3.5       1   one
5       d         3  1.0       1   two
6       a         1  2.0       1   two
> 
> dfmat2 <- corpus_subset(data_corpus_inaugural, President == "Obama") %>%
+    tokens(remove_punct = TRUE) %>%
+    tokens_remove(stopwords("en")) %>%
+    dfm()
> tstat1 <- textstat_frequency(dfmat2)
> head(tstat1, 10)
   feature frequency rank docfreq group
1       us        44    1       2   all
2     must        25    2       2   all
3      can        20    3       2   all
4   nation        18    4       2   all
5   people        18    4       2   all
6      new        17    6       2   all
7     time        16    7       2   all
8    every        15    8       2   all
9  america        14    9       2   all
10     now        11   10       2   all
> 
> dfmat3 <- head(data_corpus_inaugural) %>%
+    tokens(remove_punct = TRUE) %>%
+    tokens_remove(stopwords("en")) %>%
+    dfm()
> textstat_frequency(dfmat3, n = 2, groups = President)
Error in textstat_frequency.dfm(dfmat3, n = 2, groups = President) : 
  object 'President' not found
Calls: textstat_frequency -> textstat_frequency.dfm
Execution halted