cwcnsg
Last Updated: February 25, 2016
·
49
· heytitle
None

Create DayOfWeek column from datetime string in R.

data = read.csv('somefiles')

data$DayOfWeek = mapply(function(r){
    as.factor(weekdays(strptime( r , format = "%Y-%B-%d %H:%M:%S" ))
  },
  data$START_TIME
);
Say Thanks
Respond