My strings look like:
[1] "Sunday, April 10, 2016" "Saturday, April 16, 2016"
I would like to apply an algorithm in R so they each read something like this and have a Class POSIXlt or POSIXct:
[1] "04/10/2016" "04/16/2016"
I tried to use strptime
and as.Date
functions, but I just cannot find a good way of doing this automatically without first removing the day of the week up front.
Any and all solutions are appreciated! I know many of you are R gurus out there, and I would very much appreciate your help!
Thank you.