I was wondering if there is a way for R to turn this format into any date object. The format is ‘month [space] day’. For example: Jan 1 or Jul 29 or Jul 30. I just want those examples to be read as a date object so I can manipulate them.
I was wondering if there is a way for R to turn this format
Share
Yes, use
as.Date, but you also have to specify a year:See
?as.Datefor more help onDateobjects, and?strptimefor help on the formatting codes.