I have a dataframe and I want to create individual JSON files and use one of the column names to name each of the JSON files.
The following code will create multiple CSV files, but instead I want JSON. I am using the iris dataset from plyr.
library(plyr)
d_ply(iris, .(Species), function(x) write.csv(x, file = paste(unique(x$Species), ".csv", sep = "")))
jsonlite,RJSONIO,rjsonand others.plyrapply(iris, 2, jsonlite::toJSON)will give you JSON for each column.