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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: corpus
> ### Title: Construct a corpus object
> ### Aliases: corpus corpus.corpus corpus.character corpus.data.frame
> ###   corpus.kwic corpus.Corpus
> ### Keywords: corpus
> 
> ### ** Examples
> 
> # create a corpus from texts
> corpus(data_char_ukimmig2010)
Corpus consisting of 9 documents.
BNP :
"IMMIGRATION: AN UNPARALLELED CRISIS WHICH ONLY THE BNP CAN S..."

Coalition :
"IMMIGRATION.  The Government believes that immigration has e..."

Conservative :
"Attract the brightest and best to our country. Immigration h..."

Greens :
"Immigration. Migration is a fact of life.  People have alway..."

Labour :
"Crime and immigration The challenge for Britain We will cont..."

LibDem :
"firm but fair immigration system Britain has always been an ..."

[ reached max_ndoc ... 3 more documents ]
> 
> # create a corpus from texts and assign meta-data and document variables
> summary(corpus(data_char_ukimmig2010,
+                docvars = data.frame(party = names(data_char_ukimmig2010))), 5)
Corpus consisting of 9 documents, showing 5 documents:

         Text Types Tokens Sentences        party
          BNP  1125   3280        88          BNP
    Coalition   142    260         4    Coalition
 Conservative   251    499        15 Conservative
       Greens   322    677        21       Greens
       Labour   298    680        29       Labour

> 
> # import a tm VCorpus
> if (requireNamespace("tm", quietly = TRUE)) {
+     data(crude, package = "tm")    # load in a tm example VCorpus
+     vcorp <- corpus(crude)
+     summary(vcorp)
+ 
+     data(acq, package = "tm")
+     summary(corpus(acq), 5)
+ 
+     vcorp2 <- tm::VCorpus(tm::VectorSource(data_char_ukimmig2010))
+     corp <- corpus(vcorp2)
+     summary(corp)
+ }
Error in getS3method("pGetElem", class(x), TRUE) : 
  length(class) == 1L is not TRUE
Calls: <Anonymous> -> getS3method -> stopifnot
Execution halted