splitAtGaps: Split track at gaps

View source: R/splitAtGaps.R

splitAtGapsR Documentation

Split track at gaps

Description

Defines a new ID variable, which changes where there is a long gap in the data. This is sometimes useful for preprocessing data prior to using prepData.

Usage

splitAtGaps(data, maxGap = 60, shortestTrack = 0, units = "mins")

Arguments

data

Data frame with (at least) columns for "ID" and "time"

maxGap

Longest allowed gap, in minutes by default (but see argument "units"). Track will be split at longer gaps.

shortestTrack

Shortest track to keep after splitting, in minutes. Shorter tracks will be removed from the output data set.

units

Character string, e.g., "mins" (default), "secs", "hours", "days". Time units used for the maxGap and shortestTrack arguments.

Value

Data frame with identical structure as input, where ID column has been replaced by new ID for split tracks. Old ID still accessible as ID_old column


TheoMichelot/moveHMM documentation built on March 18, 2024, 2:38 a.m.