I have two data frames with data from the same month, but on different days.
I want to match these to on a month by month basis, so "2017-07-01" and "2017-07-29" should both be seen as July 2017 when I combine these data frames.
They are dates, but I used the format(x, ...) function in order to remove the day from the Date columns.
This gives me the format "2017-07", but turns their class into characters,. When I use the as.Date(x, ...) function to assign a date to it, it removes are dates and gives me "NA" instead of "2017-07"
Does anyone know what I am doing wrong with the as.Date(), format() functions, or if if there is another way to match them by month?