label_slices: Label Slices of Wave Files

Description Usage Arguments Value Examples

View source: R/data_labeling.R

Description

Plug the labels from a set of annotations (made by annotator_app) in a dataset of slices (made by slice_wavs).

Usage

1
label_slices(slices_dir, annotations, pattern = NULL)

Arguments

slices_dir

atomic character. Path to dir where the slices are (see slice_wavs).

pattern

atomic character. A regex pattern to select files from 'slices_dir'. Useful to filter out just specifc types of labels (see examples).

annotations_dir

atomic character or a tibble. If character, path to dir where the annotations are. If tibble, a tibble created by tidy_annotations.

Value

tibble of slices with label column.

Examples

1
2
3
4
5
6
7
slices_dir <-  system.file("wav_sample_slices_1000ms", package = "mestrado")
annotations_dir <-  system.file("annotations", package = "mestrado")
slices_1000ms_labels <- label_slices(
  slices_dir, 
  annotations_dir, 
  pattern = "Glaucidium|Megascops-atricapilla"
)

Athospd/mestrado documentation built on Jan. 2, 2021, 3:59 a.m.