Converting species column to factor

Take a look at the as.factor()function

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.