**DEPRECATED:** Use the R6 interface instead: `formant$get_mean()`
Arguments
- formant
A legacy
praat_formant-shaped list: a plain list with avalueselement (a data.frame with columnstime,formant_number,frequency,bandwidth) and aclassattribute of"praat_formant".extract_formants()no longer produces this (it now returns an R6Formantobject instead — see itsextract_formantsdocumentation); build one by hand for this legacy function, or useformant$get_mean()on an R6Formantobject directly instead of this deprecated wrapper.- formant_number
Which formant (1 = F1, 2 = F2, etc.)
- time_range
Optional numeric vector c(start, end) in seconds
Examples
# A praat_formant-shaped list (see the @param formant description
# above); built directly here for a self-contained example.
formant <- structure(
list(
values = data.frame(
time = c(0.1, 0.1, 0.2, 0.2),
formant_number = c(1, 2, 1, 2),
frequency = c(500, 1500, 520, 1480),
bandwidth = c(80, 120, 85, 110)
),
n_frames = 2,
n_formants = 2
),
class = "praat_formant"
)
get_mean_formant(formant, formant_number = 1)
#> Warning: get_mean_formant() is deprecated and will be removed in v6.0.0. Use the R6 interface: formant$get_mean(formant_number, from_time, to_time)
#> [1] 510