I have a dataset that looks like this:
Month count 2009-01 12 2009-02 310 2009-03 2379 2009-04 234 2009-05 14 2009-08 1 2009-09 34 2009-10 2386
The most concise solution if you need the dates to be in Date format:
library(zoo) month <- "2000-03" as.Date(as.yearmon(month)) [1] "2000-03-01"
as.Date will fix the first day of each month to a yearmon object for you.
as.Date