Description Usage Arguments Details Value References See Also Examples
calc.gpe2
calculates likelihood estimates for each day of animal tag
data.
1 |
locs |
is data frame from -Locations file output from DAP/Tag Portal for WC tags and contains GPS, Argos, and GPE locations as applicable. |
locDates |
is vector of dates from locs dataframe |
locs.grid |
is list output from |
dateVec |
is vector of dates from tag to pop-up in 1 day increments. |
errEll |
is logical indicating whether error ellipses should be generated for light-based likelihoods as given from output of WC-GPE. False if only longitude should be used. If False, standard deviation on light measurements is currently fixed at 0.7 deg longitude following Musyl et al 2011. Default is FALSE and will use longitude only. |
gpeOnly |
is logical. If TRUE (default), locs input is trimmed to GPE positions only. This is most applicable in scenarios with FastGPS data and you're adding this as a GPS input. |
Light errors are parameterized using elliptical error values output in '-Locations.csv' (WC tags).
L is an array of lon x lat likelihood surfaces (matrices) for each time point (3rd dimension)
Musyl MK, Domeier ML, Nasby-Lucas N, Brill RW, McNaughton LM, Swimmer JY, Lutcavage MS, Wilson SG, Galuardi B, Liddle JB (2011) Performance of pop-up satellite archival tags. Mar Ecol Prog Ser
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 | ## Setup for calculating light likelihood
# Read the data
locsFile <- system.file("extdata", "141259-Locations-GPE2.csv", package = "HMMoce")
locs <- read.table(locsFile, sep = ',', header = TRUE, blank.lines.skip = FALSE)
# Set spatial and temporal limits
sp.lim <- list(lonmin = -82, lonmax = -25, latmin = 15, latmax = 50)
locs.grid <- setup.locs.grid(sp.lim)
iniloc <- data.frame(matrix(c(13, 10, 2015, 41.3, -69.27, 10, 4, 2016, 40.251, -36.061),
nrow = 2, ncol = 5, byrow = TRUE))
names(iniloc) <- list('day','month','year','lat','lon')
tag <- as.POSIXct(paste(iniloc[1,1], '/', iniloc[1,2], '/', iniloc[1,3], sep=''),
format = '%d/%m/%Y', tz='UTC')
pop <- as.POSIXct(paste(iniloc[2,1], '/', iniloc[2,2], '/', iniloc[2,3], sep=''),
format = '%d/%m/%Y', tz='UTC')
dateVec <- as.Date(seq(tag, pop, by = 'day'))
# Try a calculation
L.light <- calc.gpe2(locs[1,], iniloc, locs.grid, dateVec, errEll=TRUE, gpeOnly=TRUE)
## Not run:
# Full example light calculation
L.light <- calc.gpe2(locs, iniloc = iniloc, locs.grid = locs.grid,
dateVec = dateVec, errEll = TRUE, gpeOnly = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.