Description Usage Arguments Details Value References Examples
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.
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
)
|
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 |
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
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;
track_ID: is the unique track ID, should be named following each GPS raw file
nbNA: indicating if the relative point is precise or if is was NA after the interpolation process
ColonyDist: is the distance (km) separating the relative point and the colony
PointDist: is the distance (km) separating two consecutive points (zi - zi-1)
tripID: trip number in the trackID group
birdTrip: unique bird trip identifyer
TripLength: Total time length of the trip (min)
TripDist: Cumulative distance flew by the bird for the specific trip
Speed: Speed between t-1 and t in m/s
nPoints: number of points composing the trip
maxDist: maximum distance that the bird went in its trip, relative to the colony
propNA: proportion of NAs in the trip. Convenient for filtering for reliability of the statistics
BegPoint: colony or trip. Specify if the first point was at the colony or outside (i.e. trip). Convenient for filtering for completness
EndPoint: colony or trip. Specify if the last point was at the colony or outside (i.e. trip). Convenient for filtering for completness
Freitas, C., Lydersen, C., Ims, R.A., Fedak, M.A. and Kovacs, K.M. (2008) A simple new algorithm to filter marine mammal Argos locations Marine Mammal Science 24:315-325.
McConnell, B.J., Chambers, C. and Fedak, M.A. (1992) Foraging ecology of southern elephant seals in relation to the bathymetry and productivity of the Southern Ocean. Antarctic Science 4:393-398.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.