View source: R/TrajectoryGeometry.R
generateRandomPaths | R Documentation |
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.
generateRandomPaths(
path,
from = 1,
to = nrow(path),
d = ncol(path),
randomizationParams,
N
)
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. |
This function returns a list of random paths. Each path is a matrix.
randomizationParams = c('byPermutation','permuteWithinColumns')
randomPaths = generateRandomPaths(crooked_path,from=6,to=nrow(crooked_path),
d=ncol(crooked_path),randomizationParams=randomizationParams,
N=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.