For a corpus object, returns the first or last n
documents.
# S3 method for corpus
head(x, n = 6L, ...)# S3 method for corpus
tail(x, n = 6L, ...)
a dfm object
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
A corpus class object corresponding to the subset defined
by n
.
# NOT RUN {
head(data_corpus_inaugural, 3) %>%
summary()
tail(data_corpus_inaugural, 3) %>%
summary()
# }
Run the code above in your browser using DataLab