sum_trips: Calculate trip summaries

View source: R/OPPFunctions.R

sum_tripsR Documentation

Calculate trip summaries

Description

sum_trips quickly calculates summary information such as maximum distance from the colony, trip start time, trip end time, and trip duration for each individual trip ID. The function accepts outputs from either opp_get_trips or ctcrw_interpolation. If interpolated data are provided, the output provides a summary of interpolated trips.

Usage

sum_trips(data)

Arguments

data

Trip data output from opp_get_trips() or ctcrw_interpolation().

Examples

## 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 = 2,
                         showPlots = TRUE)

my_interp <- ctcrw_interpolation(data = my_trips,
                                site = my_track2kba$site,
                                type = c('Complete','Gappy'),
                                timestep = '10 min',
                                showPlots = T,
                                theta = c(8,2),
                                quiet = TRUE
)

sum_trips(my_trips)
sum_trips(my_interp)

## End(Not run)

popovs/OPPtools documentation built on July 8, 2023, 2:29 a.m.