Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrap balT() formula arg in as.formula() #118

Open
benthestatistician opened this issue Sep 4, 2020 · 1 comment
Open

wrap balT() formula arg in as.formula() #118

benthestatistician opened this issue Sep 4, 2020 · 1 comment

Comments

@benthestatistician
Copy link
Collaborator

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)

@josherrickson
Copy link
Collaborator

Seems this would fit into a larger solution to dispatch on the first argument of balanceTest to make balanceTest.formula and balanceTest.character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants