In an example I'm working with I got
> covariates %>% setdiff("adjcnt_a20_64") %>%
+ paste(collapse="+") %>% paste("z ~", .) %>%
+ balanceTest(counties, unit.weights=adjcnt_a20_64)
Error: $ operator is invalid for atomic vectors
Was able to get it to run by
covariates %>% setdiff("adjcnt_a20_64") %>%
paste(collapse="+") %>% paste("z ~", .) %>%
as.formula() %>%
balanceTest(counties, unit.weights=adjcnt_a20_64)
Perhaps this is something we can take care of rather than leaving it to the user to figure out? (proj1-balT@ec7b1ee)