There is a list of data frames that the second row of each data frame is the total row. I want to sort the columns horizontally largest-to-smallest by total? Here is a sample of a data frame.
structure(list(PROVINCE = c("Percentage", "Total", "11", "11",
"11", "11"), DISTRICT = c("Percentage", "Total", "1", "2", "4",
"4"), SUB_DISTRI = c("Percentage", "Total", "21", "21", "10",
"10"), VILLAGE = c("Percentage", "Total", "14", "5", "22", "24"
), `0` = c("0.111897382265155", "59.930000305176", "0", "9.1700000762939",
"0", "0"), `9` = c("0.545072631055998", "291.930001258852", "0",
"0", "9.6999998092651", "10"), `11` = c("0.0171216252074662",
"9.1700000762939", "9.1700000762939", "0", "0", "0"), `1167` = c("0.325908361471381",
"174.550001144409", "0", "36.6800003051756", "0", "0")), row.names = c(34L,
33L, 1L, 2L, 3L, 4L), class = "data.frame")