Learn R Programming

textmining (version 0.0.1)

tmCorpus: Function to create tmCorpus

Description

Function to create tmCorpus

Usage

tmCorpus(x = NULL, ..., package = "base")

Arguments

x
source, for package stylo it supposed to be directory with Corpus files
...
other arguments dependent on package that we use
package
package of reading the data could be tm or stylo

Value

returns tmCorpus object

Examples

Run this code
corp <- tmCorpus(c("This is corp", "Document 2"))
corp <- tmCorpus(list("This is corp", "Document 2"))
corp <- tmCorpus(VectorSource(c("This is corp", "Document 2")), package = "tm")
## Not run: 
# corp <- tmCorpus(DirSource("directory"), package = "tm")
# corp <- tmCorpus("directory", package = "stylo")
# ## End(Not run)

Run the code above in your browser using DataLab