Performance R Factor Function Running Slow With Long Dataframe Stack Overflow

Performance R Factor Function Running Slow With Long Dataframe Stack Overflow