I have a df with a date column (year month) like this: 7-Feb, 7-March ( meaning February 2007, March 2007 etc). I want to make it like this 2007-02, 2007-03 etc. I tried to solve it by this code
as.Date(df$date,format="%y-%b")
But it produces na na ...
As a new learner of r, could you help me in this regard?