Learn R Programming

tm (version 0.5-1)

tm_combine: Combine Corpora and Documents

Description

Combine serveral corpora into a single one or combine multiple documents into a corpus.

Usage

## S3 method for class 'Corpus':
c(x, \dots, recursive = FALSE)
## S3 method for class 'TextDocument':
c(x, \dots, recursive = FALSE)

Arguments

x
A corpus or a text document.
...
Corpora or text documents.
recursive
Logical. Provided by generic function definition but not used.

Details

Meta data from input objects (corpora or documents) is preserved during concatenation and intelligently merged into the newly created corpus. Although we use a sophisticated merging strategy (by using a binary tree for corpus specific meta data and by joining document level specific meta data in data frames) you should check the newly created meta data for consistency when merging corpora with (partly) identical meta data. However, in most cases the meta data merging strategy will produce validly combined and arranged meta data structures.

Examples

Run this code
data("acq")
data("crude")
summary(c(acq,crude))
summary(c(acq[[30]],crude[[10]]))

Run the code above in your browser using DataLab