convert.tm.to.character {textreg} | R Documentation |
Convert tm corpus to vector of strings.
Description
A utility function useful for testing and some dirty hacks. This is because the tm package doesn't leave vector corpora of strings alone anymore.
and so sometimes you need to convert your tm object to a string vector for various reasons, the main one being handing it to the C++ method. It is ugly, but so it goes.
It is therefore a possibly better decision to pass a filename to a plain-text file
to the textreg call to be loaded by C++ directly.
See textreg
.
Usage
convert.tm.to.character(corpus)
Arguments
corpus |
The tm corpus to convert. |
Value
vector of character.
[Package textreg version 0.1.5 Index]