conSpatial: Mapping wildlife contacts

Description Usage Arguments Details Value See Also Examples

View source: R/conSpatial.r

Description

The function conSpatial is a simple function for mapping where wildlife contacts occur on the landscape with wildlife telemetry data.

Usage

1
conSpatial(ltraj, type = "point", def = "all")

Arguments

ltraj

an object of the class ltraj which should be output from the function conPhase.

type

one of ('point' - the default or 'line'). Whether to generate contacts as points or phases as lines, points are the default, but lines can be useful for plotting and exploratory analysis. NOTE: if type = 'line' only those contact phases with at least two contact points are returned. So it is useful to use this in combination with contact points.

def

if type = 'point' one of ('all','phase','first','last','minDist','minTime') which defines how contacts are to be mapped using all or part of a contact phase. (see Details)

Details

The function conSpatial can be used to map where contacts occur on the landscape, contacts being defined spatially based on a distance threshold dc and temporally based on the time threshold tc – see the function GetSimultaneous. The location of the contact can be calculated in a number of ways, and represented as points for each contact, or as line grouped by the contact phases. Which contacts to map can be defined in a number of ways using the def parameter:

i) def = 'all' (the default) all fixes where column contacts = 1 are returned in the sf object;
ii) def = 'phase' all fixes which are part of a phase are returned, note the number of points when def = 'phase' should be greater than or equal to that when def = 'all' because of how phases are defined;
iii) def = 'first' the first location fix of each phase is returned;
iv) def = 'last' the last location fix of each phase is returned;
v) def = 'minDist' the location fix of each phase which has the minimal contact distance is returned;
vi) def = 'minTime' the location fix of each phase with the minimal time difference with contact fixes is returned;

Value

An sf object containing the locations/paths of the contacts. The time of the contact is stored in the attributes of the output object, along with the actual distance between fixes. The lines object contains attributes of the time of contact, and the min, max, and mean distance apart along a line segment.

See Also

conProcess, conPhase

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data(does)
doecons <- conProcess(does,tc=15*60,dc=50)
doephas <- conPhase(doecons,pc=60*60)
pts <- conSpatial(doephas)
plot(pts['contact_pha'])
lns <- conSpatial(doephas,type='line')
plot(lns['contact_pha'])

## End(Not run)

wildlifeDI documentation built on June 16, 2021, 5:07 p.m.