I am trying to select some column by name, and the names are numbers. This is the code:
df2 <- df1 %>% select(`Year`, all_of(append(list1, list2))) %>%
I get this error:
Error: Can't subset columns that don't exist. x Locations 61927, 169014, 75671, 27059, 225963, etc. don't exist. i There are only 5312 columns.
I think the error is due to column names being numbers. How do I solve it? (I want to keep the column name as numbers)