首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >R:如何在get_acs中命名整洁人口普查中的列?

R:如何在get_acs中命名整洁人口普查中的列?
EN

Stack Overflow用户
提问于 2019-01-09 00:10:52
回答 1查看 336关注 0票数 0

当我跑的时候

代码语言:javascript
复制
age <- get_acs(geography="tract",table="B01001",state="IL")

我得到以下错误:

代码语言:javascript
复制
Getting data from the 2012-2016 5-year ACS
Loading ACS5 variables for 2016 from table B01001. To cache this dataset for faster access to ACS tables in the future, run this function with `cache_table = TRUE`. You only need to do this once per ACS dataset.
Using FIPS code '17' for state 'IL'
Error: Columns 1, 2, 3, 4, 5, … (and 47 more) must be named.
Use .name_repair to specify repair.

它还具有以下回溯:

代码语言:javascript
复制
 ─tidycensus::get_acs(...)
 ─purrr::map(...)
 ─tidycensus:::.f(.x[[i]], ...)
 ─tidycensus:::load_data_acs(...)
 ─dplyr::tbl_df(fromJSON(content))
 ─tibble:::as_tibble.matrix(data, .name_repair = "check_unique")
 ─tibble:::as_tibble.data.frame(m, ..., .name_repair = .name_repair)
 ─tibble:::as_tibble.list(unclass(x), ..., .rows = .rows, .name_repair = .name_repair)
 ─tibble:::lst_to_tibble(x, .rows, .name_repair, col_lengths(x))
 ─tibble:::set_repaired_names(x, .name_repair)
 ─tibble:::repaired_names(names(x), .name_repair = .name_repair)
 ─tibble:::check_unique(new_name)

什么是.name_repair,如何使用它来指定修复?或者有其他方法可以绕过这个问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-01-10 04:24:11

我已经向CRAN发布了一个新版本的tidycensus (0.9),它解决了这个问题-如果你遇到这个问题,请更新!

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54095605

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档