Hi I am trying to transpose json files into csv/xls/something flat.
My code is as follows:
read code into R object
history_1 <- fromJSON('/Users/uuuuuuu/fr24/history_1.json', flatten=TRUE)
*** This works **
flatten the json format ready to export
history_1A <- as.data.frame(history_1)
*** this code gives following error **
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, :
arguments imply differing number of rows: 1, 0
There are 130 of these files. When I try it on the last file it works fine...
history_119 <- fromJSON('/Users/uuuuuuu/fr24/history_119.json', flatten=TRUE)
history_119A <- as.data.frame(history_119)
So, I know the issue is caused by the differences in the json files but I don't understand how to solve the issue.
Any help appreciated!