在代码中看起来像这样(尝试过滤一些变量)。
library(magrittr)
d.cty <- filter(ann2012full, agglvl_code==70)%.%
select(state, county, abb, avg_annual_pay, annual_avg_emplvl)%.%
mutate(wage=Discretize(avg_annual_pay),
empquantile=Discretize(annual_avg_emplvl))
数据集
head(ann2012full)
[1] area_fips own_code industry_code
[4] agglvl_code size_code year
[7] qtr disclosure_code annual_avg_estabs
[10] annual_avg_emplvl total_annual_wages taxable_annual_wages
[13] annual_contributions annual_avg_wkly_wage avg_annual_pay
[16] lq_disclosure_code lq_annual_avg_estabs lq_annual_avg_emplvl
[19] lq_total_annual_wages lq_taxable_annual_wages lq_annual_contributions
[22] lq_annual_avg_wkly_wage lq_avg_annual_pay oty_disclosure_code
[25] oty_annual_avg_estabs_chg oty_annual_avg_estabs_pct_chg oty_annual_avg_emplvl_chg
[28] oty_annual_avg_emplvl_pct_chg oty_total_annual_wages_chg oty_total_annual_wages_pct_chg
[31] oty_taxable_annual_wages_chg oty_taxable_annual_wages_pct_chg oty_annual_contributions_chg
[34] oty_annual_contributions_pct_chg oty_annual_avg_wkly_wage_chg oty_annual_avg_wkly_wage_pct_chg
[37] oty_avg_annual_pay_chg oty_avg_annual_pay_pct_chg agglvl_title
[40] industry_title own_title size_title
[43] state_fips area_title polyname
[46] county abb state
<0 rows> (or 0-length row.names)
我认为字段名称很好,我认为整体数据很好,所以我不确定这里发生了什么。我可能只是错过了一些简单的东西,但我无法看到它。任何人都对这里发生的事情有任何见解?感谢。