Learn R Programming

tmcn (version 0.2-12)

createWordFreq: Create a word frequency data.frame.

Description

Create a word frequency data.frame.

Usage

createWordFreq(obj, onlyCN = TRUE, stopwords = NULL, useStopDic = TRUE)

Arguments

obj

A character vector or DocumentTermMatrix to calculate words frequency.

onlyCN

Keep only chinese words.

stopwords

A character vector of stop words.

useStopDic

Whether to use the default stop words.

Value

A data.frame.

Examples

Run this code
# NOT RUN {
createWordFreq(c("a", "a", "b", "c"), onlyCN = FALSE, useStopDic = FALSE)

# }

Run the code above in your browser using DataLab