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

keep setting #1

Open
bbbales2 opened this issue Dec 1, 2020 · 0 comments
Open

keep setting #1

bbbales2 opened this issue Dec 1, 2020 · 0 comments

Comments

@bbbales2
Copy link

bbbales2 commented Dec 1, 2020

Should this:

df <- left_join(df, statelevel_predictors, by = "state", keep = TRUE)

be

df <- left_join(df, statelevel_predictors, by = "state", keep = FALSE)

If I do the first I get something like:

   abortion state.x eth       male age   educ           state.y repvote region       
      <dbl> <chr>   <chr>    <dbl> <chr> <chr>          <fct>     <dbl> <fct>        
 1        1 CO      White     -0.5 50-59 4-Year College CO        0.473 West         
 2        1 CO      White     -0.5 50-59 HS             CO        0.473 West         
 3        0 TX      Other     -0.5 30-39 4-Year College TX        0.547 South        
 4        0 MI      White     -0.5 18-29 4-Year College MI        0.501 North Central
 5        0 WI      Black      0.5 60-69 HS             WI        0.504 North Central

And there is a state.x and a state.y instead of a state.

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

1 participant