get_var_score_dep: get_var_score_dep function

View source: R/get_var_score_dep.R

get_var_score_depR Documentation

get_var_score_dep function

Description

Dependency function for get_var_score. Not to be used as a standalone. Takes a gap_table for gaps belonging to the same transition type and computes the variability score. The score is the standard deviation of all the gaps, divided by their mean.

Usage

get_var_score_dep(gap_table, denom_var = T, min = 2)

Arguments

gap_table:

A tibble as produced using the get_gaps function. It has columns sound.files, gap_dur, selec and transitions.

denom_var:

logical indicating whether the standard denominator for variance N-1 should be used instead of N. T is for N-1, F for N. Default is N-1.

min:

The minimum number of transitions required for computing the bird's individual Cjb (coefficient of variation). If the bird sings less of a transition than min, the coefficient is 0. Default min = 2.

Value

A numeric, scalar score.

Examples

unit_table = tibble::tibble(start = c(0.37, 0.6, 0.75, 0.2, 1.8, 2.5), 
end = c(0.45, 0.7, 0.9, 0.4, 2, 3), 
selec = c(1,2,3,1,2,3),
sound.files = c(rep("JS001.wav",3),rep("JS002.wav", 3)), 
note_label = rep(c("A","B","C"),2))
output = get_gaps(unit_table)
get_var_score_dep(output)

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