Converting date string (fiscal month and year) to date

Actually, I misread your post and am not sure why yours doesn't create a new column. The notes below still apply though.

Using the reproducible example created by @andresrcs earlier.


# Sample data on a copy/paste friendly format (replace this with your actual data frame)
sample_df <- data.frame(stringsAsFactors = FALSE,
                        book_fiscal_month = c("2018-M01", "2018-M02", "2018-M03")

sample_df %>% 
  mutate(month = str_remove(book_fiscal_month, "M")) %>% 
  mutate(month = as.yearmon(month)) %>% 
  mutate(month = as.Date(month))
  book_fiscal_month      month
1          2018-M01 2018-01-01
2          2018-M02 2018-02-01
3          2018-M03 2018-03-01

Next time, create a reproducible example.