r - 将列表转换为R中的DataFrame?错误:获取默认列名(x1、x2、x3..)而不是列表中的名称
问题描述
我正在尝试将大约 200 行 json 字符串转换为 R 中的数据框。我最终在数据框中获取默认列名,而不是列表中提到的列名。这是我的代码:
out <- lapply(readLines("exampleFile.json", n=200), fromJSON) // Used to convert json into a list
test <- data.frame(t(sapply(out,c))) //convert the list into a dataframe
感谢任何帮助!
解决方案
推荐阅读
- spring-boot - 无法让 liquibase 读取我的 JPA 实体的更改
- powershell - 我如何用 powershell 编写优雅的 ping
- javascript - Toogle Google 输入工具通过 Angular
- meilisearch - MeiliSearch 自动补全
- python - 如何使用 Selenium 在菜单中选择一个选项?
- firebase - CocoaPods 找不到 pod“RNFBApp”的兼容版本
- c# - 无法使用 masstransit 将消息发布到 rabbitmq
- python - 将成对并联而不是串联
- angular - 在 ngFor 指令中访问特定的 ElementRef
- sql-server - T-SQL : 过滤掉所有在 > 6 个月之前离职的员工