meta-methods {tm}R Documentation

Methods for Function meta in Package ‘tm’

Description

Methods for function meta in package tm.

Methods

object = "TextDocument", tag = NULL
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", tag = NULL, type = "indexed"
This method investigates the type argument. type must be either indexed (default), local, 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), local accesses the meta data local to each text document (i.e., meta data in text documents' S4 slots), and corpus is 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", tag = NULL
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-3 Index]