Last Updated: February 25, 2016
·
219
· heytitle

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
);