calcFPS: Calculates the framerate of a time series, in frames per...

Description Usage Arguments Value Note See Also Examples

View source: R/calcFPS.R

Description

Calculates the modal number of frames per second from a matrix, dataframe or list of time series.

Usage

1
calcFPS(dat)

Arguments

dat

a matrix or dataframe, or list of matrices or dataframes, that contain a variable called 'time'. Data should not not yet be resampled, e.g. by rubitLinearInterpolate

Value

a numeric: the calculated framerate, in frames per second. For a single time series, the median framerate is returned; for a list of time series, the mode of individual framerates is returned.

Note

This function is intended for outputs from the 'rubitrail' package.

See Also

rubitBasic and rubitMetrics for information on re-encoding a new framerate into tracking data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(weevils_raw)

### Framerate of area '08'
calcFPS(weevils_raw[['08']])

### Framerate of each individual area
sapply(weevils_raw, calcFPS)

### Modal framerate of all areas combined
calcFPS(weevils_raw)

JoGall/rubitrail documentation built on May 7, 2019, 10:53 a.m.