【发布时间】:2020-04-02 16:12:04
【问题描述】:
我正在使用 R 库 tidycensus 数据从 census.gov 下载数据。然后我正在使用 传播()。每个大地水准面都有许多列具有估计值,但它为其余列产生 NA。
data after applying spread function
请帮我更正数据。
输入:
structure(list(GEOID = c(13001950100, 13001950100, 13001950100,
13001950100, 13001950100, 13001950100), NAME = c("Census Tract 9501, Appling County, Georgia",
"Census Tract 9501, Appling County, Georgia", "Census Tract 9501, Appling County, Georgia",
"Census Tract 9501, Appling County, Georgia", "Census Tract 9501, Appling County, Georgia",
"Census Tract 9501, Appling County, Georgia"), variable = c("S2401_C01_001",
"S2401_C01_002", "S2401_C01_003", "S2401_C01_004", "S2401_C01_005",
"S2401_C01_006"), estimate = c(1406, 271, 54, 54, 0, 0), moe = c(214,
87, 43, 43, 13, 13)), row.names = c(NA, -6L), class = c("tbl_df",
"tbl", "data.frame"))
【问题讨论】:
-
您可以将数据发布为代码而不是图像吗?