我想弄清楚如何将数据库转储文件读入R中的表格。将数据库转储文件读入R
下面是该文件的第一行:
{ "id" : { "id" : "43" }, "type" : "Account::Private", "full_name" : "Joe Doe" }
我需要将其与相应的列标题解析到一个表。
我只知道read.table
,scan
,以及良好格式化数据集的基本命令。
谢谢你的帮助。
编辑:
我的数据库转储看起来是这样的:
{ {"id" : { "id" : "43" }, "type" : "Account::Private", "full_name" : "Joe Doe" }, {"id" : { "id" : "44" }, "type" : "Account::Private", "full_name" : "Jane Doe" }, {"id" : { "id" : "45" }, "type" : "Account::Private", "full_name" : "John Doe" }}
谢谢!我去检查'json'的文档,发现你可以使用'fromJSON'命令读取整个数据文件。 在我的情况下,多行被包裹成'{}',大括号。你可以请,告诉我如何阅读我的整个文件? – notrockstar
您可以发布更具代表性的数据样本,包括开始和结束? – mhermans