R converting dataframe of strings to unique numbers

I have a dataframe that’s very large (let’s say 8 rows by 10,000 columns) that is filled with strings. I want to convert each unique string to a number and replace it with it. For example, if I had a dataframe: X1 X2 X3 1 cat mouse rabbit 2 dog cat, dog dog I’d like… Read More R converting dataframe of strings to unique numbers

How do I get R to recognize the appropriate order for Month Year combinations without manually specifying the order?

I have a list of dates, and I need to report them by month and year (Mar 2020, Apr 2020, etc). However, when I parse the Month and Year from the date, I get a character string instead of a date, so when I try to plot it into ggplot, the order is alphabetical instead… Read More How do I get R to recognize the appropriate order for Month Year combinations without manually specifying the order?