Skip to content

keep setting #1

@bbbales2

Description

@bbbales2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions