head.corpus: Return the first or last part of a corpus
Description
For a corpus object, returns the first or last n documents.
Usage
# S3 method for corpus
head(x, n = 6L, ...)
# S3 method for corpus
tail(x, n = 6L, ...)
Arguments
x
a dfm object
n
a single integer. If positive, the number of documents for the
resulting object: number of first/last documents for the dfm. If negative,
all but the n last/first number of documents of x.
...
additional arguments passed to other functions
Value
A corpus class object corresponding to the subset defined
by n.