get_var_score_dep2: get_var_score_dep2

View source: R/get_var_score_dep2.R

get_var_score_dep2R Documentation

get_var_score_dep2

Description

Dependency function for gap_var_score. Not to be used alone. Computes the weighted population mean coefficient of variation for a transition type.

Usage

get_var_score_dep2(transition, gap_table)

Arguments

transition:

A string indicating the transition type.

gap_table:

a gap table produced from the get_gaps function

Value

A numeric variable for the mean coefficient of variantion

Examples

  unit_table1 = tibble::tibble(start = c(0.37, 0.6, 0.75, 0.95, 1.8, 2.5),
end = c(0.45, 0.7, 0.9, 1.4, 2, 3),
selec = seq(6),
sound.files = c(rep("JS001.wav",6)),
note_label = c(rep("A",3), rep("B",3) ))
unit_table2 = tibble::tibble(start = c(0.30, 0.5, 0.75, 0.95, 1.8, 2.5),
                             end = c(0.45, 0.7, 0.9, 1.4, 2, 3),
                             selec = seq(6),
                             sound.files = c(rep("JS002.wav",6)),
                             note_label = c(rep("A",2), rep("B",4) ))
gap_table = get_gaps(rbind(unit_table1,unit_table2))

transition = "B-B"
output = get_var_score_dep2(transition, gap_table)

Anthony-Kwong/birdsong.tools documentation built on April 14, 2023, 9:50 a.m.