I'm getting an error message when exporting data to CSV. The code I'm using is as follows:
library(jsonlite)
energy <- "https://cdn.rawgit.com/christophergandrud/networkD3/master/JSONdata/energy.json" %>%
fromJSON
file <- c("C://Users//x////sankeyData.txt")
write.table(energy, file, sep="\t")
The error message I'm getting is the following: Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 48, 68
Any ideas on what am I doing wrong?
Thanks