diveMove-internal {diveMove} | R Documentation |
Functions used for very particular tasks within larger functions in diveMove
.diveIndices(diveID, diveNo) .getInterval(time) .speedStats(x, vdist) .night(time, sunrise.time, sunset.time) .rleActivity(time, act, interval) .speedCol(x)
diveID |
Numeric vector of all dive and non dive IDs. |
diveNo |
Numeric vector of unique dive indices to extract from
diveID . |
time |
POSIXct object representing time. |
x |
For .speedStats , a matrix with a dive's section data
(time, speed). A single dive's data, a 3-col matrix with time,
depth, and speed. For .speedCol, a data frame where names are
searched for strings matching .speedNames (see Details). |
vdist |
Vertical distance travelled during this time. If
vdist is missing, then it's all horizontal movements (no
angles). |
sunrise.time, sunset.time |
Passed from plotTD . |
act |
A numeric vector indicating the activity for every element
of time . |
interval |
Sampling interval in seconds. |
These functions are not meant to be called directly by the user, as he/she could not care less (right?). This may change in the future.
.speedNames
is a character vector with possible names for a
speed vector.
.rleActivity
takes a factor indicating different activity
phases, their associated time, and the sampling interval to return a
factor uniquely identifying each phase of activity, i.e. labelling
them. In addition, it returns the duration of each phase, and their
beginning and end times.
.diveIndices
returns a numeric vector with the indices of dives
(and their beginning/end indices) in diveID
.
.getInterval
returns a scalar, the mode of intervals between
time readings.
.speedStats
returns a 3-column matrix with total distance, mean
speed, and angle for a section of a dive.
.night
returns a list with sunrise and sunset times for dates
in time
.
.speedCol
returns column number where speed is located in x.
.rleActivity
returns a list with components:
time.br |
A factor dividing act into different periods of
activity. |
time.peract |
The duration of each period of activity. |
beg.time, end.time |
POSIXct objects indicating the beginning and ending times of each period of activity. |
Sebastian P. Luque spluque@gmail.com