sampleMove: sampleMove

Description Usage Arguments Details Value See Also Examples

View source: R/sampleMove.R

Description

Remote sensing oriented sampling of stops along a movement track.

Usage

1
2
3
4
5
6
7
sampleMove(
  xy,
  obs.time,
  search.radius,
  distance.method = "m",
  time.unit = NULL
)

Arguments

xy

Object of class SpatialPoints or SpatialPointsDataFrame.

obs.time

Object of class Date, POSIXlt or POSIXct with the same length as xy.

search.radius

Numeric element with search radius (in meters).

distance.method

How should the distance be estimated? One of 'm' or 'deg'. Default is 'm'.

time.unit

Time unit to estimate elapsed time. See difftime for keywords. Default is mins.

Details

This function finds location where an animal showed little or no movement based on GPS tracking data. It looks at the distance among consecutive samples and identifies the start of a segment when the distance is bellow search.radius. When a segment is started, the function looks at the distance between the starting point and the following observations are assigned to the same segment until the threshold is exceeded. When this occurs, the function summarizes the observations assigned to the segment deriving mean coordinates, the start, end and total time spent and the total number of observations per segment. The user should selected distance.method in accordance with the projection system associated to the data. If 'm', the function bases this analysis on the the ecludian distance. However, if 'deg' it set, the function uses the haversine formula. The final output is a SpatialPointsDataFrame containing the following information:

Value

A SpatialPointsDataFrame.

See Also

labelSample backSample dataQuery

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
{

 require(raster)

# reference data
data(longMove)

 # sampling without reference grid
 obs.time = strptime(longMove$timestamp, "%Y-%m-%d %H:%M:%S")
 output <- sampleMove(longMove, obs.time, 7, distance.method='deg')

 # compare original vs new samples
 plot(longMove, col="black", pch=16)
 points(output$x, output$y, col="red", pch=15)

}

rsMove documentation built on July 1, 2020, 6:02 p.m.