Read large twitter json file & Travis fix #154
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a simple bugfix for
get_json_tweets()
.Current
master
branch breaks an R-session when the text file is large (I realized that when I try to read a 300MB file). This is because in the current implementation, the function tries to read the entire file withreadLines()
and then pass the text vector toStreamR::parseTweet()
:https://github.com/quanteda/readtext/blob/master/R/get-functions.R#L60-L62
This is unnecessary, as
StreamR::parseTweet()
can handle file inputs by directly passing the file path.This PR also fixes travis error, by simply switching from Trusty (14.04) to Xenial (16.04).
Xenial is available since Nov 2018, but somehow I missed the update.
https://blog.travis-ci.com/2018-11-08-xenial-release
Closes #148