我正在用一些联邦数据测试RSocrata。我遵循github documentation来使用API来读取数据集。我不明白的是,为什么当我使用url时read.socrata()可以工作,而当我使用数据集提供的API端点时却不能。
相反,在使用API端点键时,我收到了rbind错误,指出列数不匹配。
> token = "MYTOKEN"
> df.url <- read.socrata("https://data.medicare.gov/Hospital-Compare/Hospital-General-
+ Information/xubh-q36u", app_token = token)
> nrow(df.url)
[1] 4818
>
>
> df.api <- read.socrata("https://data.medicare.gov/resource/rbry-mqwu.json", app_token = token)
Error in rbind(deparse.level, ...) :
numbers of columns of arguments do not match
> nrow(df.api)
Error in nrow(df.api) : object 'df.api' not found发布于 2016-11-04 09:36:56
我想你的问题会在this issue in the RSocrata repo中得到回答。
https://stackoverflow.com/questions/40403555
复制相似问题