I'm trying to inner join two datasets, rate and state.regions. R gives me an error message:
cannot join on columns 'StateCode' x 'abb': index out of bounds.
I have no idea how to fix it. Is there anybody can help with this problem? Thanks!
stateRates <- rate %>%
filter(IndividualRate<9000 & BusinessYear==2016) %>%
group_by(StateCode) %>%
summarise(MedianIndividualRate = median(IndividualRate),
value = median(IndividualRate)) %>%
inner_join(state.regions, by=c("StateCode"="abb"))