i am working on rstudio. i have a dataframe with column names as follows: USA10 USA2 USA31 UK10 UK2 UK48 UK31 FRA31 FRA2 and so on. how can i arrange column names so they start with according to reverse alphabetical but increasing numeric order that is USA1 USA2 ... UK1 UK2 ... FRA1 FRA2 and so on. I tried
select(order(colnames(data),decreasing = TRUE))
however this ignores the numeric part of the column names. i would like the column names to be sorted by alphabets and numbers then. thanks!