R: Как назвать столбцы в get_acs из tidycensus? - PullRequest
0 голосов
/ 08 января 2019

Когда я бегу

age <- get_acs(geography="tract",table="B01001",state="IL")

Я получаю следующую ошибку:

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.

Он также имеет следующую обратную трассировку:

 ─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 и как его использовать для определения исправления? или есть другой способ обойти это?

1 Ответ

0 голосов
/ 09 января 2019

Я опубликовал новую версию tidycensus (0.9) для CRAN, которая решает эту проблему - пожалуйста, обновите, если вы столкнетесь с этой проблемой!

...