1

I am trying to read large (>10gb) JSONL files in R, but I am getting an error message when I use the fromJSON function:

library(rjson)

data = "D:/Data/2020-02-01_tweets.jsonl"

result <- fromJSON(file=data)

Error in paste(readLines(file, warn = FALSE), collapse = "") : result would exceed 2^31-1 bytes

I did some research and it turns out JSONL files are different from regular JSON ones in the sense that each entry in the JSONL is valid JSON. How should I go about importing these files? I have 32gb of ram so size shouldn't be an issue.

Thierry
  • 21
  • 2

0 Answers0