Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The readTabular() function is gone in the newest version of tm. What do we use as its replacement?

Tags:

r

tm

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.

like image 925
wordsforthewise Avatar asked Jan 03 '23 03:01

wordsforthewise


1 Answers

Per "news for package tm" on CRAN (https://cran.r-project.org/web/packages/tm/news.html):

readTabular() has been removed. Use DataframeSource instead.

like image 182
JeffR Avatar answered Jan 05 '23 17:01

JeffR