I am new here, new to R and trying to find a community that could help me learn and grow.
I am currently following some Data Camps courses and simultaneously, I am trying to apply what i learn on my own data set from a future experiment that I will run.
I am trying to look at the levels of a variable but the output I obtain is NULL. My variable is chr and I am not sure how to transform it into a factor (as I think would help my NULL problem).
How do I convert a chr variable into a variable with factor?
There is forcats package that might be of use for you to work with factors in a little bit more streamlined fashion.
For example, if you want to add new levels in factor vector, you can use fct_expand.