I am trying to do some data analysis on a dataset which among other things has a column for month (recorded as "jan",..., "dec"
) and day of the week ("mon",...,"fri"
). I have two questions. My first question is how can I get the mode of these variables using the mfv
function in the modeest
package. I have a feeling this has something to do with type of variable I need to make it (factor, character etc.). I would rather not recode the data into a numeric variable.
If I make the variables factors I can get a plot by going plot(data$month)
, but now my plot is in alphabetical order and not temporal order, how can I change this?
Thanks!