I'm pretty new to r but picking it up gradually. My question is, I want to make my date vector start from the earliest date rather from the newest. I have about 50 odd rows and want it in order of earliest first.
head(dates1) [1] "2016-03-04" "2016-02-26" "2016-02-19" "2016-02-12" "2016-02-05" "2016-01-29"
I've tried order() but it gives back numeric values, I want to keep them as dates.
Thanks if you can help.