-1

Does R have a package where I can create a set of dates from two periods without importing data?

Example:

to create a list from "1/13/2014" to 1/13/15" for each day how can I do this?

EDIT: This is NOT a duplicate. Seq() package shows no example for dates in this format: "mm/dd/yy". Seq() package only has "1994-01-01" format. Please help here.

Tyrion Lannister
  • 270
  • 2
  • 7
  • 20
  • 2
    Still a duplicate as far as I'm concerned. The answer to the other question even shows how to tackle a specific formatting of the date series output. It would be a tiny adaptation to fit the exact needs of your problem. – thelatemail Mar 10 '15 at 03:28

1 Answers1

5

Yes, this is done with seq

seq(as.Date("2014-01-13"), as.Date("2015-01-13"), by="days")

you can wrap it in format to change the month, day, year order:

format(seq(as.Date("2014-01-13"), as.Date("2015-01-13"), by="days"), format="%m-%d-%Y")
jalapic
  • 13,792
  • 8
  • 57
  • 87