I am trying to re-order the way my factor variables are listed and it is not working. The variable DMU has 20 levels that are the numbers 1-19 and Unknown. I created a tibble that counts how many times each unique factor occurs with the code
DMU_2020_Count <- data %>% group_by(DMU) %>% summarize(count=n())
However I would like the DMUs to be listed in numerical order (with unknown last) for presentation purposes. I've tried the code below but it doesn't give the desired product. It does not give an error message - just the following warning: Warning message:
Outer names are only allowed for unnamed scalar atomic inputs