Nicholas Bradley
Nicholas Bradley

Reputation: 19

How to combine corpus documents

The example below is a list of 14 texts within a corpus. The corpus consists of 14 documents. I am trying to find a way to combine all the texts into one document. Then, the corpus would consist of 1 document rather than 14.

Upvotes: 1

Views: 1254

Answers (1)

Ken Benoit
Ken Benoit

Reputation: 14902

Try:

corpus(texts(oldcorpus, groups = rep(1, ndoc(oldcorpus))))

Upvotes: 3

Related Questions