Skip to content
Prev 388581 / 398530 Next

Assigning categorical values to dates

Not if you use as.factor to convert a character type column to factor  
levels. It should recode the distinct string values to factors  
automatically for you.

i.e.,

df$datefactors <- as.factor(df$datestrings)



Quoting "N. F. Parsons" <nathan.f.parsons at gmail.com>: