prepare_intervals_for_sampling: Prepare intervals for sampling

View source: R/lena.R

prepare_intervals_for_samplingR Documentation

Prepare intervals for sampling

Description

  • remove incomplete intervals,

  • check that there are still some left after that,

  • check that there are at least size intervals, unless allow_fewer is TRUE

Usage

prepare_intervals_for_sampling(intervals, size, duration, allow_fewer)

Arguments

intervals

A tibble with columns interval_start, interval_end, interval_start_wav, and recording_id as output by prepare_intervals. Can contain other columns.

size

required sample size

duration

Interval duration supported by lubridate::period, e.g., '2 mins'.

allow_fewer

Is it OK if there are fewer than size intervals?

Value

intervals with incomplete intervals removed


BergelsonLab/blabr documentation built on April 19, 2024, 7:21 p.m.