Learn R Programming

tm (version 0.4)

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 S4 object of class Dictionary which extends the class character representing a dictionary.

Examples

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

Run the code above in your browser using DataLab