trajectoryProjection {ecotraj}R Documentation

Trajectory projection

Description

Performs an projection of a set of target points onto a specified trajectory and returns the distance to the trajectory (i.e. rejection) and the relative position of the projection point within the trajectory.

Usage

trajectoryProjection(
  d,
  target,
  trajectory,
  tol = 1e-06,
  add = TRUE,
  force = TRUE
)

Arguments

d

A symmetric matrix or an object of class dist containing the distance values between pairs of ecological states (see details).

target

An integer vector of the ecological states to be projected.

trajectory

An integer vector of the ecological states conforming the trajectory onto which target states are to be projected.

tol

Numerical tolerance value to determine that projection of a point lies within the trajectory.

add

Flag to indicate that constant values should be added (local transformation) to correct triplets of distance values that do not fulfill the triangle inequality.

force

Flag to indicate that when projection falls out of the reference trajectory for a given, the closest point in the trajectory will be used.

Value

A data frame with the following columns:

Author(s)

Miquel De Cáceres, CREAF


[Package ecotraj version 1.1.0 Index]