Beyond the built-in shorthand functions (e.g., ymd()), lubridate can parse all sorts of date formats using parse_date_time(). See the link for all the details, but for instance you can do this:
library(lubridate)
#>
#> Attaching package: 'lubridate'
#> The following object is masked from 'package:base':
#>
#> date
set.seed(42)
# Invent some dates in a month-year format
dates <- paste(
sample(1:12, 30, replace = TRUE),
sample(2016:2017, 30, replace = TRUE),
sep = "-"
)
dates
#> [1] "11-2017" "12-2017" "4-2016" "10-2017" "8-2016" "7-2017" "9-2016"
#> [8] "2-2016" "8-2017" "9-2017" "6-2016" "9-2016" "12-2016" "4-2017"
#> [15] "6-2016" "12-2017" "12-2017" "2-2017" "6-2017" "7-2017" "11-2016"
#> [22] "2-2016" "12-2016" "12-2017" "1-2016" "7-2017" "5-2017" "11-2016"
#> [29] "6-2016" "11-2017"
lubridate::parse_date_time(dates, orders = "mY")
#> [1] "2017-11-01 UTC" "2017-12-01 UTC" "2016-04-01 UTC" "2017-10-01 UTC"
#> [5] "2016-08-01 UTC" "2017-07-01 UTC" "2016-09-01 UTC" "2016-02-01 UTC"
#> [9] "2017-08-01 UTC" "2017-09-01 UTC" "2016-06-01 UTC" "2016-09-01 UTC"
#> [13] "2016-12-01 UTC" "2017-04-01 UTC" "2016-06-01 UTC" "2017-12-01 UTC"
#> [17] "2017-12-01 UTC" "2017-02-01 UTC" "2017-06-01 UTC" "2017-07-01 UTC"
#> [21] "2016-11-01 UTC" "2016-02-01 UTC" "2016-12-01 UTC" "2017-12-01 UTC"
#> [25] "2016-01-01 UTC" "2017-07-01 UTC" "2017-05-01 UTC" "2016-11-01 UTC"
#> [29] "2016-06-01 UTC" "2017-11-01 UTC"
Created on 2018-07-18 by the reprex package (v0.2.0).
A month-year date is going to be represented internally as the first day of the month, but in general this doesn't matter — any time you need to output the date for display, you can format it as just month-year using format() or lubridate::stamp().