Learn R Programming

sharpshootR (version 2.3)

dist.along.grad: Compute Euclidean distance along a gradient.

Description

This function computes Euclidean distance along points aligned to a given gradient (e.g. elevation).

Usage

dist.along.grad(coords, var, grad.order, grad.scaled.min, grad.scaled.max)

Value

A data.frame object:

scaled.grad

scaled gradient values

scaled.distance

cumulative distance, scaled to the interval of 0.5, nrow(coords) + 0.5

distance

cumulative distance computed along gradient, e.g. transect distance

variable

sorted gradient values

x

x coordinates, ordered by gradient values

y

y coordinate, ordered by gradient values

grad.order

a vector index describing the sort order defined by gradient values

Arguments

coords

a matrix of x and y coordinates in some projected coordinate system

var

a vector of the same length as coords, describing the gradient of interest

grad.order

vector of integers that define ordering of coordinates along gradient

grad.scaled.min

min value of rescaled gradient values

grad.scaled.max

max value of rescaled gradient values

Author

D.E. Beaudette

Details

This function is primarily intended for use within plotTransect.

See Also

plotTransect