generateRandomPaths: Produce random paths modeled on a given path

Description Usage Arguments Value Examples

View source: R/TrajectoryGeometry.R

Description

This function takes a path and produces N random paths of the same dimension and length based on it. This can be done either by permuting the entries in path or by taking steps from the initial point of path. Exact behaviour is controlled by randomizationParams.

Usage

1
2
3
4
5
6
7
8
generateRandomPaths(
path,
from = 1,
to = nrow(path),
d = ncol(path),
randomizationParams,
N
)

Arguments

path

- This is an mxn dimensional matrix. Each row is considered a point.

from

- The starting place along the path which will be treated as the center of the sphere. This defaults to 1.

to

- The end point of the path. This defaults to nrow(path).

d

- The dimension under consideration. This defaults to ncol(path)

randomizationParams

- A character vector controling the randomization method used. It's first entry must be either 'byPermutation' or 'bySteps' See the vignette for further details.

N

- The number of random paths required.

Value

This function returns a list of random paths. Each path is a matrix.

Examples

1
2
3
4
randomizationParams = c('byPermutation','permuteWithinColumns')
randomPaths = generateRandomPaths(crooked_path,from=6,to=nrow(crooked_path),
            d=ncol(crooked_path),randomizationParams=randomizationParams,
            N=10)

AnnaLaddach/TrajectoryGeometry documentation built on Jan. 28, 2021, 10:41 a.m.