When I try and rename multiple columns in dplyr, I'm getting an "object not found" error regarding the new name.
I am creating a new data frame using select, and then I'd like to change the names of columns 4:8.
commute_mode<-select(commute,geoid,GEO.id2,display_label,HD01_VD26,HD01_VD37,HD01_VD68,HD01_VD113,HD01_VD125) %>%
rename(HD01_VD26 = drive, HD01_VD37 = carpool,HD01_VD68 = public_trans,HD01_VD113 = walk, HD01_VD125=bike_other)
but I'm getting
Error in .f(.x[[i]], ...) : object 'drive' not found