filt: Delineating movement trips for central-place foraging species

Description Usage Arguments Details Value References Examples

View source: R/filt.R

Description

This function was developped to conveniently delineate trips from raw GPS data for central-place foraging species. It also includes various "filtering" options to segment trips.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
filt(
  pathF = ...,
  pathM = ...,
  metname = NULL,
  nbn = c("NULL"),
  gpst = NULL,
  ddep = NULL,
  drecap = NULL,
  colony = NULL,
  year = NULL,
  ring = NULL,
  tdep = NULL,
  trecap = NULL,
  timezone = NULL,
  Clong = NULL,
  Clat = NULL,
  speedTresh = NULL,
  FIX = NULL,
  FixInt = NULL,
  BuffColony = NULL,
  MinTripDur = NULL,
  Complete = FALSE,
  Interpolate = FALSE,
  filtNA = 1,
  metINFO = c(NULL),
  splt = TRUE
)

Arguments

pathF

path leading to your tracks

pathM

path leading to your metadata file

metname

a character string corresponding to the metadata file's name

nbn

character. Vector of "names" matching your raw GPS files (i.e. which are linked by the pathF argument). See details for more details

gpst

a character string corresponding to the metadata's column name containing the GPS type

ddep

a character string corresponding to the metadata's column name containing the date of departure

drecap

a character string corresponding to the metadata's column name containing the date of retrieval

colony

a character string corresponding to the metadata's column name containing individual colony attribution

year

a character string corresponding to the metadata's column name containing the year of sampling

ring

a character string corresponding to the metadata's column name containing the individual ring number

tdep

a character string corresponding to the metadata's column name containing the time of departure

trecap

a character string corresponding to the metadata's column name containing the time of retrieval

timezone

time zone in which data are recorded

speedTresh

numeric treshold used as speed cutoff for speed filtering (km/h)

FIX

a character string corresponding to the metadata's column name containing the numeric interval separating two locations in the GPS track

FixInt

numeric interval that should separate two locations in GPS tracks for interpolation (minutes; e.g. 2, 10)

BuffColony

numeric value indicating the buffer radius length around the colony (km)

MinTripDur

numeric value used for filtering trip by minimum trip duration (minutes)

Complete

logical; if TRUE, only complete trip will be kept

Interpolate

logical; if TRUE, tracks are interpolated

filtNA

numeric value which correspond of the filtering treshold for number of NAs generated along the interpolation. Between 0 and 1, whereas 1 correspond to no filtration at all (filtering only trips that are 100% full of NAs)

metINFO

character string(s). Used as a vector of name for the additional information you want to add to the final data frame for facilitating the subsequent analyses. However, names should fit the column name occuring in the metadata file (i.e. pathM)

splt

logical; if TRUE, the final trips are ordered as a list instead of an unique data frame. Default FALSE

Details

Raw GPS data (located via pathF) should be as .csv format. This version only include 4 types of GPS format 1) Catlog, 2) IGotU, 3) PathTracks and 4) Ecotone. If your file doesn't have any specific format, the gpst could be specified as IGotU (one line header, and the raw data in the second lines. However, one should make sure that the Latitude, Longitude, Date and Time are specified. Date could be supplied as character, as YYYY-MM-DD or MM/DD/YYYY and Time also as character as HH:MM:SS). Raw GPS data are expected to be in lat long coordinate system Distance between points are calculated via the Great Circle distance, computed via sp package

Value

the function return either a data frame (splt = FALSE) or a list (splt = TRUE) containing each bird trip as component Metrics for each trip are also computed, as;

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
pathF <- c("C:/Users/User/files/allspecies/")
pathM <- c("C:/Users/User/files/metadata/")
metname <- c("meta.csv")
timezone <- c("GMT")

f <- filt(pathF, pathM, metname, nbn = c("year", "colony", "ring", "recapture"),
timezone, speedTresh = 90, gpst = "GPSType",
ddep = "deployment", drecap = "recapture", colony = "colony", year = "year",
ring = "ring", FIX = "FIX", tdep = "utc_deployment", trecap = "utc_retrieval",
Clong = "Clongitude", Clat = "Clatitude", BuffColony = 0.5, MinTripDur = 30, Complete = T, FixInt = 2,
Interpolate = T, filtNA = 0.9, metINFO = c("ring", "year", "species", "colony"), splt = F)

## End(Not run)

PhilBertrand/CPFMove documentation built on Nov. 22, 2020, 4:45 a.m.