Tag: Sort character as numerical in R

  • Sort text as numbers in R

    Sort text as numbers in R

    Sometimes it might be useful to sort text as numbers in R. For example, if you have a month’s names and it is necessary to show them in chronological order in ggplot. Even if the content is already in the right order, it doesn’t work that way on the x-axis.