问题
In tm
version 0.7-1, there was a readTabular()
function. Now it is gone, and if you try to use it, there is no deprecation message or warning or anything, like you might reasonably expect. It's just gone. In the distant past (4 days ago), it could be used like:
library(tm)
myReader <- tm::readTabular(mapping=list(id="id", content="content"))
cor <- tm::VCorpus(tm::DataframeSource(dt), readerControl = list(reader = myReader))
So how do you do something like that in the newest version of tm
, 0.7-2?
PS: I think the newest version was released about 4 days ago as of this post, but it's pretty hard to tell from the news section of the repo, which seems to have a nasty formatting bug or something. Also, I think readTabular was introduced in 2009 as 'experimental'. No idea why it was removed, if anyone can find any explanation anywhere in the repo, please post the link. Here's the docs for readTabular.
回答1:
Per "news for package tm" on CRAN (https://cran.r-project.org/web/packages/tm/news.html):
readTabular() has been removed. Use DataframeSource instead.
来源:https://stackoverflow.com/questions/47604511/the-readtabular-function-is-gone-in-the-newest-version-of-tm-what-do-we-use-a