If you know that your first date is a Friday then you can use seq with
by=7 day, then you don't need to post filter the vector.
On Thu, Mar 1, 2012 at 1:40 PM, Ben quant ccqu...@gmail.com wrote:
Great thanks!
ben
On Thu, Mar 1, 2012 at 1:30 PM, Marc Schwartz marc_schwa...@me.com wrote:
On
Hello,
How do I get the dates of all Fridays between two dates?
thanks,
Ben
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Inelegant, but here's one way:
d1 - Sys.Date()
d2 - Sys.Date() + 100
library(lubridate)
d - seq(d1, d2, by = day)
d[wday(d)==6]
Michael
On Thu, Mar 1, 2012 at 3:02 PM, Ben quant ccqu...@gmail.com wrote:
Hello,
How do I get the dates of all Fridays between two dates?
thanks,
Ben
On Mar 1, 2012, at 2:02 PM, Ben quant wrote:
Hello,
How do I get the dates of all Fridays between two dates?
thanks,
Ben
Days - seq(from = as.Date(2012-03-01),
to = as.Date(2012-07-31),
by = day)
str(Days)
Date[1:153], format: 2012-03-01 2012-03-02
Great thanks!
ben
On Thu, Mar 1, 2012 at 1:30 PM, Marc Schwartz marc_schwa...@me.com wrote:
On Mar 1, 2012, at 2:02 PM, Ben quant wrote:
Hello,
How do I get the dates of all Fridays between two dates?
thanks,
Ben
Days - seq(from = as.Date(2012-03-01),
to =
5 matches
Mail list logo