extract_cues {tagtools}R Documentation

Extract multiple sub-samples of data

Description

This function is used to extract multiple sub-samples of data from a vector or matrix.

Usage

extract_cues(x, sampling_rate, cues, len)

Arguments

x

is a vector or matrix of measurements. If x is a matrix, each column is treated as a separate measurement vector.

sampling_rate

is the sampling rate in Hz of the data in x.

cues

defines the start time in seconds of the intervals to be extracted from x.

len

is the length of the interval to extract in seconds. This should be a scalar.

Value

A list with 2 elements:

Note

Output sampling rate is the same as the input sampling rate.

Examples

BW <- beaked_whale # beaked_whale must be in your working directory
list <- extract_cues(x = BW$A$data, sampling_rate = BW$A$sampling_rate, cues = c(6, 40), len = 11)

[Package tagtools version 0.1.0 Index]