angle: Headings of the segments of a movement track

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function calculates the heading of each segment between consecutive locations of a track.

Usage

1
2
3
4
  ## S4 method for signature '.MoveTrackSingle'
angle(x)
  ## S4 method for signature '.MoveTrackStack'
angle(x)

Arguments

x

a move, moveStack or moveBurst object

Details

The headings are calculated using the functions bearing of the geosphere package.

Value

Angles in degrees (between -180 and 180).

If a move object is provided, a numeric vector one element shorter than the number of locations is obtained.
If a moveStack object is provided, a list with one element per individual containing a numeric vector one element shorter than the number of locations is obtained.

Author(s)

Marco Smolla & Anne Scharf

See Also

turnAngleGc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## angles from a Move object 
data(leroy)
head(angle(leroy))
 # to add this information to the move object, a "NA" has to be assigened
 # e.g. to the last location (it also could be assigend to the first location).
leroy$angles <- c(angle(leroy), NA)

## angles from a MoveStack object
data(fishers)
str(angle(fishers))
 # to add this information to the moveStack object, a "NA" has to be assigened
 # e.g. to the last location of each individual (it also could be assigend to the first location).
fishers$angles <-unlist(lapply(angle(fishers), c, NA))

move documentation built on Aug. 24, 2017, 1:04 a.m.