sample_intervals_with_highest: Sample intervals that are highest on a given metric

sample_intervals_with_highestR Documentation

Sample intervals that are highest on a given metric

Description

Sample intervals that are highest on a given metric

Usage

sample_intervals_with_highest(
  intervals,
  column,
  size,
  duration,
  allow_fewer = FALSE
)

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.

column

Name of the column whose value is to be maximized.

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

A subsample of intervals.


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