Let\'s say that I have a date in R and it\'s formatted as follows.
date 2012-02-01 2012-02-01 2012-02-02
Is there any way in R to
Use the lubridate package and function wday:
lubridate
wday
library(lubridate) df$date <- as.Date(df$date) wday(df$date, label=TRUE) [1] Wed Wed Thurs Levels: Sun < Mon < Tues < Wed < Thurs < Fri < Sat