I am trying to facet about 14 plots based on a variable that runs from 2-14. The plots show up in the order: 10,11,12,13,14,15,2,3,4,5,6,7,8,9
How do I get them to order from 2-15?
update: ok, so I made it a factor using data$var=as.factor(data$var)
.
The Levels are
Levels: 10 11 12 13 14 15 2 3 4 5 6 7 8 9
How do I reorder those?
data$var <- factor(data$var, levels = sort(unique(data$var)))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With