sensTime: Sensitivity of minimum trip duration on trip delineation

Description Usage Arguments Details Value References Examples

View source: R/SensTime.R

Description

This function was developped to give basic visualization tools to facilitate the selection of the minimum trip length and the effect of this variation on the number of trip generated

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
sensTime(
  pathF = ...,
  pathM = ...,
  nbn = c("NULL"),
  iter = 50,
  metname = NULL,
  param = NULL,
  gpst = NULL,
  FIX = NULL,
  ddep = NULL,
  drecap = NULL,
  colony = NULL,
  year = NULL,
  ring = NULL,
  tdep = NULL,
  trecap = NULL,
  timezone = NULL,
  Clong = NULL,
  Clat = NULL,
  speedTresh = NULL,
  BuffColony = NULL,
  FixInt = NULL,
  Interpolate = FALSE,
  sorc = 0.05
)

Arguments

pathF

path leading to your tracks

pathM

path leading to your metadata file

nbn

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

iter

the number of bootstrapping iterations (default = 50)

metname

a character string corresponding to the metadata file's name

param

vector of time treshold to be tested. These correspond to the different scenarios to be tested. Time is in hours format

gpst

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

FIX

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

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)

BuffColony

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

FixInt

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

Interpolate

logical; if TRUE, tracks are interpolated

sorc

numeric, proportion (0:1) treshold used for the second-order-rate of change

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

a list of object containing a data frame witht the main results of the sensitivity analysis and the associated figures. Figures are also showing the "second-order-rate of change" for each scenario. For the moment, the SORC is fixed to the 5% absolute variaiton of the total magnitude of the response (i.e. max(average(nTrip))). This is seen as a measure of "stability " of the response t among scenario t-1 and t+1.

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
pathF <- c("C:/Users/philip/OneDrive/NP_Kontrakt/StromTracks/files/lomvi/")
pathM <- c("C:/Users/philip/OneDrive/NP_Kontrakt/StromTracks/metadata/")
metname <- c("meta_bjorn.csv")
timezone <- c("GMT")
param <- seq(0, 100, by = 10)

st <- sensTime(pathF, pathM, metname, nbn = c("year", "colony", "ring", "recapture"),
       timezone, iter = 300, param = param, 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.15, FixInt = 2, Interpolate = T, sorc = 0.01)

## End(Not run)

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