For a project I'd like to read a JSON file of 9.3 MB into R and use it as a dataframe. The JSON looks as following:
{"id":"xxx"}
{"id":"xxx"}
{"id":"xxx"}
{"id":"xxx"}
.
.
.
With the following function
dh <- fromJSON(paste(readLines(json_file), collapse = ""))
I was able to import it, within my environment it is however shown as a "Large Character (9.3)" and I'm not able to further use it.
Notes
Could the handling of the file in said way have anything to do with its size?
First time working with JSON files, please go easy on me.
Thanks for any input that might help/help me get some clarity regarding working with JSON in R.
jsonfile is just full of justids. What you can try maybe is :-dh <- as.data.frame(fromJSON(paste(readLines(json_file), collapse = "")))1 obs. of 1 variablein my code ...paste0("[", paste0(readLines(json_file), collapse = ","), "]")?