Skip to content
Prev 385737 / 398503 Next

date

Another way to do this is to use the xtfrm() function.  That function 
creates numerical values from many different starting types, so you can 
just change the sign to change the sort order:

df[order(df$ID, -xtfrm(df$date2)),]

I never did figure out where the name came from.

Duncan Murdoch
On 21/09/2020 3:41 p.m., Sarah Goslee wrote: