Learn R Programming

trajr (version 1.5.1)

TrajMerge: Combine multiple trajectories into a single whole trajectory

Description

This is the inverse of TrajSplit.

Usage

TrajMerge(parts)

Value

A single trajectory.

Arguments

parts

A list containing one or more trajectories. The trajectories are concatenated together in order.

See Also

TrajSplit

Examples

Run this code
trj <- TrajGenerate(n = 20)
ntrj <- TrajMerge(TrajSplit(trj, c(3, 9, 20)))
print(all(trj == ntrj))
## [1] TRUE

Run the code above in your browser using DataLab