Re: [R] Time value not sorting properly

2010-07-08 Thread Joshua Wiley
Jared, I am not sure how you converted your 'time' variable from a factor to numeric, but you probably actually want to convert it to one of the 'time' classes. To learn more about them in R, see ?DateTimeClasses Another nice feature of these special time classes is that they can handle year, mon

[R] Time value not sorting properly

2010-07-08 Thread Jared Stabach
I have a dataframe of animal locations that I need to have in incremental order so that I can calculate the distance traveled between each time step. However, I have identified a few values that don't seem to sort properly. For instance, the last value in the table below should be the first value a