Learn R Programming

quanteda (version 0.9.9-50)

tokens_tolower: convert the case of tokens

Description

tokens_tolower and tokens_toupper convert the features of a tokens object and reindex the types.

Usage

tokens_tolower(x, ...)

tokens_toupper(x, ...)

Arguments

x
a tokens object
...
additional arguments passed to char_tolower (currently this is limited to keep_acronyms)

See Also

char_tolower, char_toupper

Examples

Run this code
# for a document-feature matrix
toks <- tokens(c(txt1 = "b A A", txt2 = "C C a b B"))
tokens_tolower(toks) 
tokens_toupper(toks)

Run the code above in your browser using DataLab