getDistanceDataForPaths: Produce distance statistics for random paths

Description Usage Arguments Value Examples

View source: R/TrajectoryGeometry.R

Description

This function takes a list of paths and a choice of statistic (median, mean or max) and returns that statistic for the appropriate center for each path. Each path is an n x d matrix. In use, it is assumed that these will be the randomized paths. It is therefore assumed that they are already of the correct dimensions.

Usage

1
getDistanceDataForPaths(paths, statistic)

Arguments

paths

- A list of paths. Each of these is an n x d matrix.

statistic

- Allowable values are 'median', 'mean' or 'max'.

Value

This returns a vector of n distances.

Examples

1
2
3
paths =
    generateRandomPaths(path=straight_path,randomizationParam='bySteps',N=5)
distance = getDistanceDataForPaths(paths=paths,statistic='max')

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