I have a vector of date objects (yyyy-mm-dd) and I want to determine if any of them are on weekend or not. Is there a function that can determine this straighta
yyyy-mm-dd
I put @AnandaMahto's suggestion here rather than a comment:
library(chron) x <- seq(Sys.Date()-10, Sys.Date(), by = 1) x[is.weekend(x)] ## [1] "2014-10-11" "2014-10-12" "2014-10-18"