【发布时间】:2018-05-25 14:59:03
【问题描述】:
无法将 json 字符串导出到文本文件 -
> tester <- list(10, 20) %>%
toJSON(. , auto_unbox = T)
> write.table(tester, file = "JSONfile.txt", sep = "")
Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) :
cannot coerce class ""json"" to a data.frame
有没有其他方法可以将 JSON 导出为文本?
【问题讨论】:
-
酷 - 写(测试仪,文件=“tester.txt”)工作!