length.trajectory {simmer} | R Documentation |
Get the number of activities in a trajectory. length
returns the number
of first-level activities (sub-trajectories not included). get_n_activities
returns the total number of activities (sub-trajectories included).
## S3 method for class 'trajectory' length(x) get_n_activities(x)
x |
the trajectory object. |
Returns a non-negative integer of length 1.
x <- trajectory() %>% timeout(1) x <- x %>% clone(2, x, x) x ## length does not account for subtrajectories length(x) get_n_activities(x)