Learn R Programming

nzilbb.vowels: Vowel Covariation Tools

The nzilbb.vowels packages contains useful functions and data for the investigation of vocalic covariation. The core of the package is a set of functions to aid PCA-based studies of monophthongs.

The package evolves along with ongoing research on vocalic covariation carried out at NZILBB.

Installation

Install from CRAN:

install.packages('nzilbb.vowels')

Development version

You can install the development version of nzilbb.vowels from GitHub with:

# install.packages("devtools")
devtools::install_github("nzilbb/nzilbb_vowels")

Example

library(nzilbb.vowels)
#> Loading required package: patchwork
ggplot2::theme_set(ggplot2::theme_bw())

# normalise vowels using Lobanov 2.0 normalisation (see Brand et al. (2021))
onze_vowels <- onze_vowels |> 
  lobanov_2()

# apply PCA to random intercepts from GAMM models (again, from Brand et al. (2021))
onze_pca <- prcomp(
  onze_intercepts |> dplyr::select(-speaker),
  scale = TRUE
)

# Test PCA using bootstrapping approach (see Wilson Black et al. (2022))
onze_pca_test <- pca_test(onze_intercepts |> dplyr::select(-speaker))

# Plot variance explained by each PC.
plot_variance_explained(onze_pca_test)

# Plot index loadings of PC1
plot_loadings(onze_pca_test)

# Plot PC in vowel space
plot_pc_vs(onze_vowels, onze_pca_test)

For more information, see Wilson Black et al. (2022) and associated supplementary material.

RStudio Add-in

It is often useful to have Wells lexical sets in small capitals in R Markdown documents. The way to achieve this manually is to add “vowel”. This package includes an RStudio add in, which can be attached to a keyboard shortcut. (see ‘Addins’ at the top of the RStudio window). This add in works for both Quarto and RMarkdown files.

Copy Link

Version

Install

install.packages('nzilbb.vowels')

Monthly Downloads

269

Version

0.4.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Joshua Wilson Black

Last Published

December 17th, 2025

Functions in nzilbb.vowels (0.4.3)

plot_variance_explained

Create plot of variances explained from pca_test object
plot_permutation_test

Create plot from permutation_test().
qb_vowels

Formants from QuakeBox 1
procrustes_loadings

Generate distribution of (index) loadings using the bootstrap and Procrustes rotation.
summary.correlation_test

Summary function for correlation test object. Set alpha to change significance level.
plot_vowel_space

Plot vowel space for speaker or speakers.
plot_procrustes_loadings

Plot loadings with confidence bands from procrustes_loadings()
sim_matrix

Similarity matrix from online perception test.
qb_intervals

Formant and amplitude for intervals of QuakeBox monologues
onze_intercepts

Speaker random intercepts from GAMMs for 100 ONZE speakers
pca_contrib_plot

PCA contribution plots
mds_test

Test optimal number of MDS dimensions.
pc_flip

Flip PC loadings
lobanov_2

Apply Lobanov 2.0 normalisation
correlation_test

Permutation test of pairwise correlations
plot_mds_test

Plot mds_test() results
pca_test

PCA with confidence intervals and null distributions
plot_loadings

Plot PC index loadings from pca_test object.
permutation_test

Run permutation test on PCA analysis.
plot_pc_vs

Plot PC loadings in vowel space
pca_rotate_procrustes

Apply Procrustes rotation to PCA loadings and scores.
pca_rotate_2d

Manually rotate two PCs around the origin
plot_pc_input

Plot Scores from Significant PCs Against PCA Input
plot_correlation_counts

Plot of correlation counts from correlation_test object
onze_vowels

Monophthong data for random sample of speakers from the ONZE corpus
nzilbb.vowels-package

nzilbb.vowels: Vowel Covariation Tools
onze_intercepts_full

Speaker random intercepts for 418 ONZE speakers
onze_vowels_full

Monophthong data for speakers from the ONZE corpus
plot_correlation_magnitudes

Plot distribution of correlations from correlation_test object