trackvisitsMergeGroups: Merges Grouped Visits from Track Objects

Description Usage Arguments Value See Also Examples

View source: R/trackvisitsMergeGroups.R

Description

trackvisitsMergeGroups merges groups of visits at the same location. For this, an object of class trackvisits has to be processed with trackvisitsGetGroups first or the variable trackvisits$group has to be defined as desired.

Usage

1
2
3
4
5
6
trackvisitsMergeGroups(
  currenttrackvisits,
  tmin,
  timeinterval = 30 * 60,
  keepgroup = FALSE
)

Arguments

currenttrackvisits

An object of class trackvisits for which groups have been defined.

tmin

The minimum residence time at a specific location [s] which is used to classify visits as campsites (if the residence time at a specific location is larger than tmin) in contrast to short-term visits of locations. The default is tmin = 345600, i.e. 4 days.

timeinterval

The number of seconds one data value (row) in currenttrack covers.

keepgroup

A logical value indicating if the input group values should be retained for each group (keepgroup = TRUE) or group should be reset to NA (keepgroup = FALSE).

Value

An object of class trackvisits in which all visits belonging to the same group are merged into one visit. The variables of currenttrackvisits are changed as:

location

not changed (location of the first visit of the group).

group

if keepgroup = TRUE, the respective input group value, if keepgroup = FALSE reset to NA.

start

value of start of the first visit of the group.

end

value of end of the last visit of the group.

starttime

value of starttime of the first visit of the group.

endtime

value of endtime of the last visit of the group.

currentvisitduration

updated.

nextvisitduration

updated.

nextvisitsamelocationduration

updated.

nextvisitsamelocation

updated.

campsite

updated.

campsiteinbetween

updated.

mergewithnext

reset to NA.

See Also

trackvisits, plot.trackvisits, trackvisitsFromTrack, trackvisitsGetGroups, trackvisitsSetNextvisitsamelocationindex, trackvisitsSetNorepeatedcampsitevisits.

Examples

1
#

henningte/herdersTA documentation built on Jan. 22, 2020, 5:16 a.m.