ctcrw_interpolation | R Documentation |
This function is a wrapper for momentuHMM::crawlWrap(), which uses the crawl package to fit ctcrw model to GPS tracks at a user-defined time interval. The function is currently designed to handle GPS data from central place foraging birds. It takes tracking data, where trips have been identified and classified using OPPTools::opp_get_trips(). The function returns a list with four objects: (1) original tracking data (as SPDF), (2) colony location (as SPDF), (3) interpolated locations (as SPDF), and (4) a list of CRAWL fits for each trip. All spatial objects are in the same custom Lambert equal area projection centered on the colony.
ctcrw_interpolation(
data,
site,
type,
timestep,
interpolateGaps = TRUE,
showPlots = TRUE,
plotsPerPage = 4,
theta = c(8, 2),
quiet = TRUE
)
data |
Trip data ouptut from OPPTools::opp_get_trips(). |
site |
Vector containing coordinates of the study site, in the same format as site information returned by OPPtools::opp2KBA or track2KBA::move2KBA. |
type |
List indicating the types of trips to include in interpolation. Possible values are: 'Complete', 'Incomplete', 'Gappy', and 'Non-trip'. Default is 'Complete'. |
timestep |
string indicating time step for track interpolation, eg. '10 min', '1 hour', '1 day' |
showPlots |
TRUE/FALSE should plots of interpolated tracks against original data be produced |
plotsPerPage |
Numeric indicating the number of individuals to include in a single plot. Defaults to 4. |
theta |
starting values for ctcrw parameter optimization, see ?crawl::crwMLE for details |
## Not run:
my_data <- opp_download_data(study = c(1247096889),login = NULL, start_month = NULL,
end_month = NULL,season = NULL)
my_track2kba <- opp2KBA(data = my_data)
my_trips <- opp_get_trips(data = my_track2kba, innerBuff = 5, returnBuff = 20,
duration = 2, gapLimit = 100, gapTime = 2, gapDist = 5,
showPlots = TRUE)
my_interp <- ctcrw_interpolation(data = my_trips,
site = my_track2kba$site,
type = c('Complete','Incomplete','Gappy'),
timestep = '10 min',
interpolateGaps = T,
showPlots = T,
plotsPerPage = 2,
theta = c(8,2)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.