segtraj: Simple trajectory segmentation

Description Usage Arguments Details Value Examples

View source: R/segtraj.R

Description

Using the classIntervals function from the classInt package perform trajectory segmentation based on a variety of simple algorithms.

Usage

1
segtraj(traj, k = 2, style = "fisher", col = "dist")

Arguments

traj

an object of the class ltraj which contains the time-stamped movement fixes of the first object. Note this object must be a type II ltraj object. For more information on objects of this type see help(ltraj),

k

(integer) the number of output classes desired from the segmentation (default = 2),

style

(character)the algorithm for identifying class breaks (default = 'fisher'),

col

the name (as a character string) of the column upon which to perform the segmentation (default = 'dist')

Details

The segementation is based on a single trajectory attribute (default is the movement distance). The default method for performing the segmentation is the Fisher-Jenks algorithm, but many are available (see the full list in the documentation for the classIntervals function).

Value

An ltraj object with a new infolocs column 'class'.

Examples

1
2
data(m3)
m3seg <- segtraj(m3)

jedalong/wildlifeTG documentation built on July 17, 2019, 2:52 p.m.