问题描述
我正在尝试加载人口普查数据,但是每次使用get_decennial
时,我的代码都会引发错误。
library(ggplot2)
library(tidyverse)
library(tidycensus)
vars <- c(tot_hh = "H001001",tot_rural_hh = "H002005",tot_rent_hh = "H004004",avg_hh_size = "H012001",tot_pop = "P003001",nh_white_pop = "P005003",nh_black_pop = "P005004",nh_asian_pop = "P005006",hispanic_pop = "P005010",med_age = "P013001")
SD_tracts <- get_decennial(geography = "tract",variables = vars,state = "CA",county = "San Diego",output = "wide")
我已经定义了几个变量,并且试图调用此数据,但是每次我得到此错误消息:
Error in UseMethod("select_") : no applicable method for 'select_' applied to an object of class "character".
我在做什么错了?
谢谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)