Learn R Programming

nzilbb.vowels

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

392

Version

0.3.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Joshua Wilson Black

Last Published

November 29th, 2024

Functions in nzilbb.vowels (0.3.1)

plot_correlation_counts

Plot of correlation counts from correlation_test object
plot_correlation_magnitudes

Plot distribution of correlations from correlation_test object
lobanov_2

Apply Lobanov 2.0 normalisation
correlation_test

Permutation test of pairwise correlations
mds_test

Test optimal number of MDS dimensions.
nzilbb.vowels-package

nzilbb.vowels: Vowel Covariation Tools
pca_contrib_plot

PCA contribution plots
pc_flip

Flip PC loadings
plot_pc_input

Plot Scores from Significant PCs Against PCA Input
qb_intervals

Formant and amplitude for intervals of QuakeBox monologues
plot_vowel_space

Plot vowel space for speaker or speakers.
onze_intercepts_full

Speaker random intercepts for 418 ONZE speakers
plot_loadings

Plot PC index loadings from pca_test object.
plot_permutation_test

Create plot from permutation_test().
pca_test

PCA with confidence intervals and null distributions
summary.correlation_test

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

Plot mds_test() results
permutation_test

Run permutation test on PCA analysis.
plot_variance_explained

Create plot of variances explained from pca_test object
plot_pc_vs

Plot PC loadings in vowel space
qb_vowels

Formants from QuakeBox 1
sim_matrix

Similarity matrix from online perception test.
onze_intercepts

Speaker random intercepts from GAMMs for 100 ONZE speakers
onze_vowels

Monophthong data for random sample of speakers from the ONZE corpus
onze_vowels_full

Monophthong data for speakers from the ONZE corpus