meta-methods {tm}R Documentation

Methods for Function meta in Package ‘tm’

Description

Methods for function meta in package tm.

Methods

object = "TextDocument"
If no tag is given, this method pretty prints all object's meta data. If tag is provided its value in the meta data is returned.
object = "Corpus"
If no tag is given, this method investigates the type argument. type must be either indexed (default) or corpus. Former is a shortcut for accessing document level meta data (DMetaData) stored at the collection level (because it forms an own entity, or for performance reasons, i.e., a form of indexing, hence the name indexed), the latter a shortcut for collection (corpus) specific meta data (CMetaData). Depending whether a tag is set or not, all or only the meta data identified by the tag is displayed or modified.
object = "TextRepository"
If no tag is given, this method pretty prints all object's meta data. If tag is provided its value in the meta data is returned.

Examples

data("crude")
meta(crude[[1]])
meta(crude[[1]], tag = "Topics")
meta(crude[[1]], tag = "Comment") <- "A short comment."
meta(crude[[1]])
meta(crude)
meta(crude, type = "corpus")
meta(crude, "labels") <- 21:40
meta(crude)

[Package tm version 0.3 Index]