Learn R Programming

simmer (version 3.6.0.9000)

Extract: Extract parts of a trajectory

Description

Operators acting on trajectories.

Usage

# S3 method for trajectory
[(x, i)

# S3 method for trajectory [[(x, i)

Arguments

x

the trajectory object.

i

indices specifying elements to extract. Indices are numeric or character or logical vectors or empty (missing) or NULL.

Numeric values are coerced to integer as by as.integer (and hence truncated towards zero). Negative integers indicate elemets/slices to leave out the selection.

Character vectors will be matched to the names of the activities in the trajectory as by %in%.

Logical vectors indicate elements/slices to select. Such vectors are NOT recycled to match the corresponding extent.

An empty index will return the whole trajectory.

An index value of NULL is treated as if it were integer(0).

Value

Returns a new trajectory object.

See Also

length.trajectory, get_n_activities, join.