MatthieuStigler / matPkg

Other
2 stars 0 forks source link

need function to compare a merge/join #37

Closed MatthieuStigler closed 5 years ago

MatthieuStigler commented 5 years ago

left_join(prem_CI_byY %>% select(st_ct_fp, crop, year, indem_CI09, prem_CI09, indemn_CI, premium_CI, yield_county_post_CI09, yield_county_mean), by = c("year", "crop", "st_ct_fp")) %>%

select(st_ct_fp, year, crop, starts_with("yield_county")) %>%

pivot_longer(matches("\.x$|\.y$"), names_to = c("variable", ".value"), names_sep = "\.") %>% filter(abs(x-y) >0.00000001)