I have a data set, (call it DATA) with a variable, COLOR. The mode of COLOR is numeric and the class is factor. First, I'm a bit confused by the "numeric" -- when printed out, the data for COLOR are not numeric -- they are all character values, like White or Blue or Black, etc. Any clarification on this is appreciated.
Further, I need to Write R code to return the levels of the COLOR variable, then determine the current reference level of this variable, and finally set the reference level of this variable to White. I tried using factor, but was entirely unsuccessful.
Thank you for taking the time to help.