Learn R Programming

tm (version 0.5-9.1)

Dictionary: Dictionary

Description

Constructs a dictionary from a character vector or a term-document matrix.

Usage

## S3 method for class 'character':
Dictionary(x)
## S3 method for class 'TermDocumentMatrix':
Dictionary(x)

Arguments

x
A character vector or a term-document matrix holding the terms for the dictionary.

Value

  • An object of class Dictionary which extends the class character representing a dictionary, i.e., a character vector of terms.

Examples

Run this code
Dictionary(c("some", "tokens"))
data(crude)
Dictionary(TermDocumentMatrix(crude))

Run the code above in your browser using DataLab