0

I try to learn how to handle out huge json file in R and convert them to csv in order to make more statistic process with them.

I try to experement with this dataset.

What I have now which calls some packages, take as input the json file (if you extract it is huge) and converts it to json and save it to csv. However the csv have only 48 rows and I think it must have more.

require(RJSONIO)
require(rjson)
library("rjson")
filename2 <- "path for json file"
json_data <- fromJSON(file = filename2)

json <- do.call("rbind", json_data)
write.csv(json,file='C:/json.csv', row.names=FALSE)
user3456789
  • 3
  • 1
  • 6
  • Note that `rjson` and `RJSONIO` are two separate packages, both having a function named `fromJSON`. You only need one, choose whichever you like better and go with that one – Ricardo Saporta Feb 07 '15 at 09:45
  • You may want to have a look at one of these questions:http://stackoverflow.com/questions/17951334/hierarchical-data-frame-to-json-with-irregular-nodes AND http://stackoverflow.com/questions/11553592/r-generic-flattening-of-json-to-data-frame – Ricardo Saporta Feb 07 '15 at 09:48
  • @Ricardo Saporta thank you for your comment. I show the link but I can't finde the libraries library(toJSON) library(data.table) – user3456789 Feb 07 '15 at 13:32
  • have a look at `?install.packages` – Ricardo Saporta Feb 08 '15 at 19:40

0 Answers0