R中的错误:选择:从菜单中输入一个项目,或0退出

时间:2018-11-04 19:17:29

标签: r json dplyr jsonlite

我正在尝试从API查询数据并将其作为表格获取。 这是我的代码:

source("keys.R")
base_uri_google <- "https://www.googleapis.com/civicinfo/v2/representatives"
params <- list(address = "Seattle,WA", key = google.key)
google_response <- GET(base_uri_google, query = params)
request_body <- content(google_response)
offices_body <- request_body$offices
officials_body <- request_body$officials
offices_table <- offices_body %>% select(name)
officials_table <- officials_body %>% select(name)

每当我运行最后两行代码时,它就会向我显示所需的数据,但随后出现:

Selection:
Enter an item from the menu, or 0 to exit.

然后当我尝试访问这两个变量时,找不到它们。

我该如何解决?

0 个答案:

没有答案