If I have the following data.frame
test.df <- data.frame(id = c(1,1,2), t = c(1,2,2) * 0.1, x = runif(3), y = runif(3),
z = runif(3))
test.df
id t x y z
1 1 0.1 0.2522754 0.3752993 0.5761627
2 1 0.2 0.4081247 0.2668070 0.7371169
3 2 0.2 0.4610473 0.6297668 0.8011669
then
as.data.frame(as.tracks(test.df), include.timepoint.column = T)
gives
id timepoint t x y z
1 1 1 0.1 0.2522754 0.3752993 0.5761627
2 1 2 0.2 0.4081247 0.2668070 0.7371169
3 2 1 0.2 0.4610473 0.6297668 0.8011669
whereas I would expect
id timepoint t x y z
1 1 1 0.1 0.2522754 0.3752993 0.5761627
2 1 2 0.2 0.4081247 0.2668070 0.7371169
3 2 2 0.2 0.4610473 0.6297668 0.8011669
Is the first the intended behavior?