Title: | Vowel Manipulation, Normalization, and Plotting |
---|---|
Description: | Procedures for the manipulation, normalization, and plotting of phonetic and sociophonetic vowel formant data. vowels is the backend for the NORM website. |
Authors: | Tyler Kendall and Erik R. Thomas |
Maintainer: | Tyler Kendall <[email protected]> |
License: | GPL-3 |
Version: | 1.2-2 |
Built: | 2025-02-13 03:41:03 UTC |
Source: | https://github.com/cran/vowels |
vowels is an R package for the manipulation, normalization, and plotting of phonetic and sociophonetic vowel formant data. vowels is the backend for the NORM website - http://lingtools.uoregon.edu/norm/
Package: | vowels |
Type: | Package |
Version: | 1.2-2 |
Date: | 2018-03-05 |
License: | GPL-3 |
URL: | http://lingtools.uoregon.edu/norm/ |
http://blogs.uoregon.edu/vowels/ | |
This package instantiates a number of normalization routines (e.g., Bark difference, Nearey, Lobanov) for acoustic vowel data. It also provides a specialized plotting function to generate "standard" vowel plots (F2~F1), and to overlay information like standard deviation bars on those vowel plots. The package also includes general purpose functions for manipulating data frames of vowel formant data, such as conversion functions to Bark and ERB scales.
This package is the backend for the NORM website - http://lingtools.uoregon.edu/norm/ . Users of the website are urged to use this package directly within R for a wider-range of functionality and customizability. See the NORM website - http://lingtools.uoregon.edu/norm/ - (and the package man pages) for more information about vowel normalization and the specific methods implemented in the package.
Kendall, Tyler and Erik R. Thomas 2009
Maintainer: Kendall, Tyler <[email protected]>
Thomas, Erik R. and Tyler Kendall. 2007. NORM: The vowel normalization and plotting suite. [ Online Resource: http://lingtools.uoregon.edu/norm/ ]
Watt, Dominic, Anne Fabricius, and Tyler Kendall. 2011. More on Vowels: Plotting and Normalization. In M. Yaeger-Dror and M. Di Paolo (eds.), Sociophonetics: A Student's Guide, 107-118. New York: Routledge.
Fabricius, Anne, Dominic Watt, and Daniel Ezra Johnson. 2009. A comparison of three speaker-intrinsic vowel formant frequency normalization algorithms for sociophonetics. Language Variation and Change 21:413-35.
Adank, Patti, Smits, Roel, and van Hout, Roeland. 2004. A comparison of vowel normalization procedures for language variation research. Journal of the Acoustical Society of America 116:3099-107.
Lobanov, B. M. 1971. Classification of Russian vowels spoken by different listeners. Journal of the Acoustical Society of America 49:606-08.
Nearey, Terrance M. 1977. Phonetic Feature Systems for Vowels. Dissertation, University of Alberta. Reprinted 1978 by the Indiana University Linguistics Club.
# You can use load.vowels(), e.g. below, to load vowel data from a URL or a local file # ohiovowels <- load.vowels("http://lingtools.uoregon.edu/downloads/CentralOhioNORM.txt") # ohiovowels is "CentralOhioNORM.txt" file from NORM website, included in the package for examples data(ohiovowels) vowelplot(ohiovowels, color="vowels", label="vowels") vowelplot(norm.bark(ohiovowels), speaker="JOHG09", color="vowels", color.choice=rainbow(length(unique(ohiovowels[,2]))), label="none", title="JOHG09 Bark Difference Normalized Vowels") add.spread.vowelplot(norm.bark(ohiovowels), speaker="JOHG09", sd.mult=1, color.choice=rainbow(length(unique(ohiovowels[,2]))), color="vowels", leg=TRUE) normed.vowels <- norm.lobanov(ohiovowels) vowelplot(normed.vowels, speaker="JOHG09", shape="vowels") vowelplot(norm.wattfabricius(ohiovowels), speaker="JOHG09", shape="vowels", color="vowels", color.choice=rainbow(length(unique(ohiovowels[,2]))), leg="vowels", title="Rainbow colored vowels for JOHG09\nWatt & Fabricious normalized")
# You can use load.vowels(), e.g. below, to load vowel data from a URL or a local file # ohiovowels <- load.vowels("http://lingtools.uoregon.edu/downloads/CentralOhioNORM.txt") # ohiovowels is "CentralOhioNORM.txt" file from NORM website, included in the package for examples data(ohiovowels) vowelplot(ohiovowels, color="vowels", label="vowels") vowelplot(norm.bark(ohiovowels), speaker="JOHG09", color="vowels", color.choice=rainbow(length(unique(ohiovowels[,2]))), label="none", title="JOHG09 Bark Difference Normalized Vowels") add.spread.vowelplot(norm.bark(ohiovowels), speaker="JOHG09", sd.mult=1, color.choice=rainbow(length(unique(ohiovowels[,2]))), color="vowels", leg=TRUE) normed.vowels <- norm.lobanov(ohiovowels) vowelplot(normed.vowels, speaker="JOHG09", shape="vowels") vowelplot(norm.wattfabricius(ohiovowels), speaker="JOHG09", shape="vowels", color="vowels", color.choice=rainbow(length(unique(ohiovowels[,2]))), leg="vowels", title="Rainbow colored vowels for JOHG09\nWatt & Fabricious normalized")
Computes the mean formant values (or medians or standard deviations) for uniquely named vowels, in a data frame of vowel formant data.
compute.means(vowels, separate=FALSE, speaker=NA) compute.medians(vowels, separate=FALSE, speaker=NA) compute.sds(vowels, separate=FALSE, speaker=NA)
compute.means(vowels, separate=FALSE, speaker=NA) compute.medians(vowels, separate=FALSE, speaker=NA) compute.sds(vowels, separate=FALSE, speaker=NA)
vowels |
a required data frame of one of two formats - either: speaker_id, vowel_id, context, F1, F2, F3, F1_glide, F2_glide, F3_glide, or: speaker_id, vowel_id, context, F1, F2, F1_glide, F2_glide. The context column and glide columns can be blank. |
separate |
if TRUE, calculates means separately for each speaker_id in the vowels data frame. Otherwise, if FALSE, the default, calculates one set of means over all speakers. "separate" trumps "speaker" |
speaker |
optionally, the speaker_id to extract from the data frame for averaging. If NA, the default, the function averages across all speakers in the data frame |
Compute the mean formant values the median formant values or the standard deviations in vowel formant data data frames. These can take either a data frame with F1, F2, and F3 data or just one with F1 and F2 data (such as that resulting from Lobanov or Watt \& Fabricius normalization)
compute.sds() mostly exists for use by the add.spread.vowelplot() function.
compute.means() and compute.medians() return either a data frame in the format speaker_id, vowel_id, N, F1, F2, F3, F1_glide, F2_glide, F3_glide with the attribute "mean.values" == TRUE or a data frame in the format speaker_id, vowel_id, N, F1, F2, F1_glide, F2_glide with the attributes "mean.values" == TRUE and "no.f3s" == TRUE. The resulting data frame also has whatever value (if any) the input data frame had for the attributes "norm.method" and "norm.variant"
The compute.medians() and compute.sds() functions have the same return values except instead of the attribute "mean.values", they have the attribute "median.values" or "standard.devs" respectively
The development of the library and this function are ongoing. The arguments to the function may change in future version.
Kendall, Tyler <[email protected]>
Thomas, Erik R. and Tyler Kendall. 2007. NORM: The vowel normalization and plotting suite. [ Online Resource: http://lingtools.uoregon.edu/norm/ ]
norm.lobanov
, norm.wattfabricius
, vowelplot
add.spread.vowelplot
data(ohiovowels) means <- compute.means(ohiovowels) vowelplot(means, color="vowels", labels="vowels") ohd.means <- compute.means(ohiovowels, speaker="OHDMTV_M") vowelplot(ohd.means, color="vowels", labels="none") add.spread.vowelplot(ohiovowels, speaker="OHDMTV_M", color="vowels", sd.mult=1)
data(ohiovowels) means <- compute.means(ohiovowels) vowelplot(means, color="vowels", labels="vowels") ohd.means <- compute.means(ohiovowels, speaker="OHDMTV_M") vowelplot(ohd.means, color="vowels", labels="none") add.spread.vowelplot(ohiovowels, speaker="OHDMTV_M", color="vowels", sd.mult=1)
Converts acoustic vowel formant data to auditory scales following Traunmuller (1997)'s' formula.
convert.bark(vowels) convert.erb(vowels)
convert.bark(vowels) convert.erb(vowels)
vowels |
a required data frame of the format: speaker_id, vowel_id, context, F1, F2, F3, F1_glide, F2_glide, F3_glide. The context column and glide columns must exist but can be empty. |
Converts vowel data from acoustic - Hertz - values to auditory values, in Bark or ERB.
convert.bark uses the Bark conversion formula from Traunmuller (1997):
Zi = 26.81/(1+1960/Fi) - 0.53
convert.erb uses the ERB conversion formula from Traunmuller (1997):
Ei = 11.17*log((Fi + 312)/(Fi + 14675))+43.0
A data frame in the format speaker_id, vowel_id, context, F1, F2, F3, F1_glide, F2_glide, F3_glide, where F1, etc, are in Bark or ERB scales. The data frame has the attribute "unit.type" of "Bark" or "ERB"
The development of the library and this function are ongoing. The arguments to the function may change in future version.
Kendall, Tyler <[email protected]>
Thomas, Erik R. and Tyler Kendall. 2007. NORM: The vowel normalization and plotting suite. [ Online Resource: http://lingtools.uoregon.edu/norm/ ]
Traunmuller, Hartmut. 1997. Auditory scales of frequency representation. [ Online: http://www.ling.su.se/staff/hartmut/bark.htm ]
A simple function that labels the first nine columns of a data frame.
label.columns(vowels)
label.columns(vowels)
vowels |
a data frame containing vowel data |
Labels the columns of the data frame according to the unit type (Hertz, Bark, ERB) of the data and whether or not the values are mean values.
A data frame containing the vowel data with the columns labeled: Speaker, Vowel, Context/N, F1, F2, F3, F1.gl, F2.gl, F3.gl
The development of the library and this function are ongoing. The arguments to the function may change in future version.
Kendall, Tyler <[email protected]>
A simple wrapper for reading a tab-delimited text file into a data frame.
load.vowels(file=NA, type="Hertz")
load.vowels(file=NA, type="Hertz")
file |
if passed, the name of the file to open. If not passed, file.choose() is called. |
type |
the current units of the formant data. Defaults to "Hertz", set to "Bark" or "ERB" if the data are already in Bark or ERB scales. |
A simple wrapper for reading a tab-delimited text file into a data frame.
A data frame containing the vowel data from the input file
The development of the library and this function are ongoing. The arguments to the function may change in future version.
Kendall, Tyler <[email protected]>
Normalizes acoustic vowel formant data using the Bark Difference Method.
norm.bark(vowels)
norm.bark(vowels)
vowels |
a required data frame of the format: speaker_id, vowel_id, context, F1, F2, F3, F1_glide, F2_glide, F3_glide. The context column and glide columns must exist but can be empty. |
The Bark Difference Method is a vowel-intrinsic method modified from the formula developed by Syrdal and Gopal (1986). Syrdal and Gopal proposed using two dimensions. Both involved computing differences between Bark-converted values (Z). To model advancement, they used either Z3-Z2 or Z2-Z1 (i.e., Bark-converted F3 minus Bark-converted F2 or Bark-converted F2 minus Bark-converted F1). To model height, they used Z1-Z0 (Bark-converted F1 minus Bark-converted F0). Z0 was used because, all other things being equal, F0 tends to be higher for high vowels than for low vowels, thus minimizing the distance between F0 and F1 for high vowels and maximizing it for low vowels. However, the problem is that all other things are seldom equal. Intonation, tone, and consonantal influences affect F0, as does creakiness. Those processes can be circumvented, but another factor, the effects of aging on F0, cannot, at least not speaker- and vowel-intrinsically. As a result, the Z3-Z1 is substituted here for Z1-Z0, though Z3-Z2 is retained.
Uses the Bark conversion formula from Traunmuller (1997):
Zi = 26.81/(1+1960/Fi) - 0.53
A data frame in the format speaker_id, vowel_id, context, Z3-Z1, Z3-Z2, Z2-Z1, Z3-Z1_gl, Z3-Z2_gl, Z2-Z1_gl with the attribute "norm.method" == "Bark Difference"
The development of the library and this function are ongoing. The arguments to the function may change in future version.
Kendall, Tyler <[email protected]>
Thomas, Erik R. and Tyler Kendall. 2007. NORM: The vowel normalization and plotting suite. [ Online Resource: http://lingtools.uoregon.edu/norm/ ]
Traunmuller, Hartmut. 1997. Auditory scales of frequency representation. [ Online: http://www.ling.su.se/staff/hartmut/bark.htm ]
norm.labov
, norm.lobanov
, norm.nearey
, norm.wattfabricius
Normalizes acoustic vowel formant data using Labovs modification of Nearey, from the Atlas of North American English.
norm.labov(vowels, G.value=NA, use.f3=FALSE, geomean=TRUE)
norm.labov(vowels, G.value=NA, use.f3=FALSE, geomean=TRUE)
vowels |
a required dataframe of the format: speaker_id, vowel_id, context, F1, F2, F3, F1_glide, F2_glide, F3_glide. The context column and glide columns must exist but can be empty. |
G.value |
the overall "grand mean" value to use in the normalization formula. See details, below. If NA, the function uses the default value of 6.896874, which Labov in his Telsur project found to be a stable group mean for 345 American English speakers. Differences in G.value for a set of data probably only effect of the scaling. |
use.f3 |
if TRUE, the normalization procedure includes F3 values in the process. This both generates normalization F3' values AND impacts the values obtained for F1' and F2'. Default is FALSE. |
geomean |
following Labov, the default (TRUE) uses the geometric mean instead of the arithmetic mean to calculate the normalized values. The results of the method are slightly different depending on which mean strategy is used, but testing has indicated the differences are insignificant. |
Labov's method - the normalization approach used by the phonological Atlas of North American English (Labov et al. 2006) - is a modification of Nearey's. While it also uses a log-mean method to normalize the formant values, the primary difference is that it computes a single grand mean for all speakers included in the study (i.e. it's speaker-extrinsic, while Nearey is typically speaker-intrinsic). Also, unlike Nearey, it computes a scaling factor for each individual which is then used to modify each individual's vowel space rather than computing a set of non-Hertz-like values. In other words, since it is speaker-extrinsic, it is able to scale the original Hertz values as a part of its normalization process.
NORM's implementation of the Labov method follows the formulas laid out by Labov et al. (2006: 39-40). A logarithmic grand geometric mean, G, is required for all vowels for all speakers. A logarithmic mean value, S, is then calculated for each speaker by taking the natural log of the F1 and F2 values for all of that speaker's vowels. The anti-log of the difference, G - S, is taken for F, the scaling factor for that speaker. Each individual's formant values are then multiplied by the scaling factor F to obtain her or his normalized values.
A data frame in one of two formats: If use.f3 is TRUE: speaker_id, vowel_id, F1', F2', F3', F1'gl, F2'gl, F3'gl If use.f3 is FALSE: speaker_id, vowel_id, F1', F2', F1'gl, F2'gl, with the attribute "no.f3s" == TRUE In both cases, the data frame also has the attributes "norm.method" == "Labov" and "G.value", which equals the used G.value. When G.value == 6.896874, there is the additional attribute of "norm.variant" == "Labov, w/ Telsur G"
The development of the library and this function are ongoing. The arguments to the function may change in future version.
Kendall, Tyler <[email protected]>
Thomas, Erik R. and Tyler Kendall. 2007. NORM: The vowel normalization and plotting suite. [ Online Resource: http://lingtools.uoregon.edu/norm/ ]
Labov, William, Sharon Ash, and Charles Boberg. 2006. The Atlas of North American English: Phonology, Phonetics, and Sound Change. A Multimedia Reference Tool. Berlin: Mouton de Gruyter.
norm.bark
, norm.lobanov
, norm.nearey
, norm.wattfabricius
Normalizes acoustic vowel formant data using Lobanov Method.
norm.lobanov(vowels, f1.all.mean=NA, f2.all.mean=NA)
norm.lobanov(vowels, f1.all.mean=NA, f2.all.mean=NA)
vowels |
a required dataframe of the format: speaker_id, vowel_id, context, F1, F2, F3, F1_glide, F2_glide, F3_glide. The context column and glide columns must exist but can be empty. |
f1.all.mean |
while it is not recommended that you supply values for f1.all.mean and f2.all.mean, doing so will override the speaker intrinsic generation of the mean formant values for the current speaker. |
f2.all.mean |
see above. |
Lobanov's method was one of the earlier vowel-extrinsic formulas to appear, but it remains among the best. The implementation here follows Nearey (1977) and Adank et al. (2004).
A data frame in the format: speaker_id, vowel_id, F1', F2', F1'gl, F2'gl, with the attributes "no.f3s" == TRUE, "norm.method" == "Lobanov"
The development of the library and this function are ongoing. The arguments to the function may change in future version.
Kendall, Tyler <[email protected]>
Thomas, Erik R. and Tyler Kendall. 2007. NORM: The vowel normalization and plotting suite. [ Online Resource: http://lingtools.uoregon.edu/norm/ ]
Adank, Patti, Smits, Roel, and van Hout, Roeland. 2004. A comparison of vowel normalization procedures for language variation research. Journal of the Acoustical Society of America 116:3099-107.
Lobanov, B. M. 1971. Classification of Russian vowels spoken by different listeners. Journal of the Acoustical Society of America 49:606-08.
Nearey, Terrance M. 1977. Phonetic Feature Systems for Vowels. Dissertation, University of Alberta. Reprinted 1978 by the Indiana University Linguistics Club.
norm.bark
, norm.labov
, norm.nearey
, norm.wattfabricius
Normalizes acoustic vowel formant data using Nearey Methods.
norm.nearey(vowels, formant.int=FALSE, use.f3=FALSE, all.mean=NA, all.mean.f2=NA, all.mean.f3=NA)
norm.nearey(vowels, formant.int=FALSE, use.f3=FALSE, all.mean=NA, all.mean.f2=NA, all.mean.f3=NA)
vowels |
a required data frame of the format: speaker_id, vowel_id, context, F1, F2, F3, F1_glide, F2_glide, F3_glide. The context column and glide columns must exist but can be empty. |
formant.int |
if TRUE, uses formant intrinsic Nearey1 procedure, calculating a separate grand mean for each formant. If FALSE, uses formant extrinisc Nearey2, calculating a combined grand mean from all formants. |
use.f3 |
if TRUE, the normalization procedure includes F3 values in the process. This both generates normalization F3 values AND impacts the values obtained for F1 and F2. Default is FALSE. |
all.mean |
while it is not recommended that you supply values for all.mean (the f1 all.mean), all.mean.f2, and all.mean.f3, doing so will override the speaker intrinsic generation of the mean formant values for the current speaker. |
all.mean.f2 |
see above. |
all.mean.f3 |
see above. |
This implements two versions of the method that Terrance Nearey developed in his 1977 dissertation. The Nearey methods are vowel-extrinsic and in general rather similar to the Lobanov formula, though their formulae differ in that they normalize using log mean values. Following Adank et al. (2004) the major branches of the Nearey method are named here Nearey1 and Nearey2.
A data frame in one of two formats: If use.f3 is TRUE: speaker_id, vowel_id, F*1, F*2, F*3, F*1gl, F*2gl, F*3gl If use.f3 is FALSE: speaker_id, vowel_id, F*1, F*2, F*1gl, F*2gl, with the attribute "no.f3s" == TRUE In both cases, the data frame also has the attributes "norm.method" == "Nearey" and "norm.variant" == "Nearey1" or "Nearey2", depending on whether formant.int is FALSE or TRUE
The development of the library and this function are ongoing. The arguments to the function may change in future version.
Kendall, Tyler <[email protected]>
Thomas, Erik R. and Tyler Kendall. 2007. NORM: The vowel normalization and plotting suite. [ Online Resource: http://lingtools.uoregon.edu/norm/ ]
Nearey, Terrance M. 1977. Phonetic Feature Systems for Vowels. Dissertation, University of Alberta. Reprinted 1978 by the Indiana University Linguistics Club.
Adank, Patti, Smits, Roel, and van Hout, Roeland. 2004. A comparison of vowel normalization procedures for language variation research. Journal of the Acoustical Society of America 116:3099-107.
Labov, William, Ash, Sharon, and Boberg, Charles. 2006. The Atlas of North American English: Phonology, Phonetics, and Sound Change. A Multimedia Reference Tool. Berlin: Mouton de Gruyter. Lobanov, B. M. 1971. Classification of Russian vowels spoken by different listeners. Journal of the Acoustical Society of America 49:606-08.
norm.bark
, norm.labov
, norm.lobanov
, norm.wattfabricius
Normalizes acoustic vowel formant data using the Watt \& Fabricius Method.
norm.wattfabricius(vowels, norm.means=FALSE, mod.WF=FALSE)
norm.wattfabricius(vowels, norm.means=FALSE, mod.WF=FALSE)
vowels |
a required dataframe of the format: speaker_id, vowel_id, context, F1, F2, F3, F1_glide, F2_glide, F3_glide. The context column and glide columns must exist but can be empty. |
norm.means |
if TRUE, the method returns only the normalized mean values for the vowels and not the individual tokens. Default is FALSE. |
mod.WF |
if TRUE, the method implements a modified version of the Watt & Fabricius algorithm (after Fabricius, Watt, and Johnson 2009) whereby the F2 value for the bottom lower corner of the vowel triangle is computed from the midpoint between the F2 values for the top two corners instead of the mean F2 value of the TRAP vowel class. Default is FALSE. |
The Watt & Fabricius method is vowel extrinsic, but unlike Lobanov's, Nearey's, and Labov's methods, the centroid or grand mean value that it uses to calculate normalized values is based on points that represent the corners of the vowel envelope: one for the high front corner, one for the high back corner, and one for the bottom corner. In Watt and Fabricius's original formulation, which was designed for the RP dialect of English, the mean F1 and F2 of the BEET vowel were used as the minimum F1 and maximum F2 values; the minimum F1 value of BEET was also used as the minimum F2 value. The mean F1 and F2 of BAT (which Watt and Fabricius label as TRAP) comprised the point for the bottom corner of the vowel envelope. Watt and Fabricius (2002) provide a clear step-by-step example of their process. In more recent work (Fabricius, Watt, and Johnson 2009), Watt and Fabricius have slightly modified their formula, which is optionally available here through the mod.WF argument.
See Thomas and Kendall (2007) for a fuller description of the implementation here.
A data frame in one of two formats: If norm.means == TRUE: a data frame with speaker_id, vowel_id, vowel_N, F1/S(F1), F2/S(F2), F1g/S(F1g), F2g/S(F2g) with the attribute "mean.values" == TRUE. If norm.means == FALSE: a data frame with speaker_id, vowel_id, context, F1/S(F1), F2/S(F2), F1g/S(F1g), F2g/S(F2g). In both cases, the data frame also has the attributes "norm.method" == "Watt & Fabricius" and "no.f3s" == TRUE. When sing mod.WF=TRUE, the result also has the attribute "norm.variant" == "ModWF".
The development of the library and this function are ongoing. The arguments to the function may change in future versions.
Kendall, Tyler <[email protected]>
Fabricius, Anne, Dominic Watt, and Daniel Ezra Johnson. 2009. A comparison of three speaker-intrinsic vowel formant frequency normalization algorithms for sociophonetics. Language Variation and Change 21:413-35.
Thomas, Erik R. and Tyler Kendall. 2007. NORM: The vowel normalization and plotting suite. [ Online Resource: http://lingtools.uoregon.edu/norm/ ]
Watt, Dominic and Fabricius, Anne. 2002. Evaluation of a technique for improving the mapping of multiple speakers' vowel spaces in the F1 ~ F2 plane. In D. Nelson, Leeds Working Papers in Linguistics and Phonetics 9:159-73.
norm.bark
, norm.labov
, norm.lobanov
, norm.nearey
A sample dataset for examples for vowels.R.
data(ohiovowels)
data(ohiovowels)
A data frame containing 447 rows and 9 columns
This dataset includes 477 vowels from 2 speakers, a female and male, from Ohio. This is the "CentralOhioNORM.txt" file available on the NORM website.
Thomas, Erik <[email protected]>
http://lingtools.uoregon.edu/norm/downloads/CentralOhioNORM.txt
Converts normalized values (such as those created by the Lobanov and Nearey methods) to Hertz-like values.
scalevowels(normed.vowels)
scalevowels(normed.vowels)
normed.vowels |
a required data frame of normalized vowel data with or without columns for normalized F3. This should be in the format: speaker_id, vowel_id, context or vowel_N, F1', F2', (F3',) F1_glide', F2_glide', (F3_glide'), where parenthesized items are optional. If there are no F3s, this should be indicated with attribute "no.f3s" set to TRUE. |
Scaling is necessary to convert the output from some normalization methods to values that appear Hertz-like (and are thus more familiar). However, scaling is rarely recommended as in someways it undoes the process of normalization. See http://lingtools.uoregon.edu/norm/about_norm.php for some important details.
The original data frame with the normalized values scaled.
The development of the library and this function are ongoing. The arguments to the function may change in future version.
Kendall, Tyler <[email protected]>
norm.lobanov
, norm.nearey
, norm.wattfabricius
Plot vowel formant data in the familiar F1~F2 dot plot format, with arrows for diphthong values. Optionally, can add standard deviation bars, or additional overlaid vowel data sets.
vowelplot(vowels, speaker=NA, color=NA, color.choice=NA, shape="speakers", shape.choice=NA, size=NA, labels="none", leg="speakers", a.size=NA, l.size=NA, title="", subtitle=NA, xlim=NA, ylim=NA) add.vowelplot(vowels, speaker=NA, color=NA, color.choice=NA, shape="speakers", shape.choice=NA, size=NA, labels="none") add.spread.vowelplot(vowels, mean.points=FALSE, sd.mult=2, ellipsis=FALSE, speaker=NA, color=NA, color.choice=NA, shape="speakers", shape.choice=NA, size = NA, leg=FALSE, labels="none", separate=TRUE) setup.axes(vowels) setup.point.color(vowels, color=NA, color.choice=NA) setup.point.shape(vowels, shape="speakers", shape.choice=NA) setup.sizes(vowels, size=NA, a.size=NA, l.size=NA)
vowelplot(vowels, speaker=NA, color=NA, color.choice=NA, shape="speakers", shape.choice=NA, size=NA, labels="none", leg="speakers", a.size=NA, l.size=NA, title="", subtitle=NA, xlim=NA, ylim=NA) add.vowelplot(vowels, speaker=NA, color=NA, color.choice=NA, shape="speakers", shape.choice=NA, size=NA, labels="none") add.spread.vowelplot(vowels, mean.points=FALSE, sd.mult=2, ellipsis=FALSE, speaker=NA, color=NA, color.choice=NA, shape="speakers", shape.choice=NA, size = NA, leg=FALSE, labels="none", separate=TRUE) setup.axes(vowels) setup.point.color(vowels, color=NA, color.choice=NA) setup.point.shape(vowels, shape="speakers", shape.choice=NA) setup.sizes(vowels, size=NA, a.size=NA, l.size=NA)
vowels |
a required dataframe of the format: speaker_id, vowel_id, context/N, F1, F2, F3, F1_glide, F2_glide, F3_glide. The context/N column and the glide columns can be blank. |
speaker |
a character string specifying which speaker to plot. If NA, the default, plots all speakers. |
color |
Use color to differentiate "speakers" or "vowels". If NA, the default, plots in black and white. |
color.choice |
A vector of colors to use if not generating a black and white plot, in hex code or valid R color name (see color()). If NA, the default, uses the default NORM colors. |
shape |
Use plot shapes to differentiate "speakers" or "vowels". Defaults to using shapes for "speakers". |
shape.choice |
A vector of point shapes for overriding the defaults (see help for points() and run example("points") - your R may support Unicode characters (IPA-like symbols)). If not enough are specified, the shapes are recycled as needed. |
size |
If NA, the dot sizes are determined logarithmically based on the number of vowel measurements to plot. Override to plot with a specific cex size. |
a.size |
The base size for annotation text and points (such as the plot title and axis labels). If NA, is set to cex 1.0. |
l.size |
The size for legend text and points. If NA, is set to 75 percent of the a.size setting. |
labels |
If "vowels", plots the vowel identifier along with the dots. If "speakers", plots the speaker ids as labels along with the dots. If labels is set to any other value, other than "none", the function includes both the speaker id and the vowel identifier as the labels. If "none", the default, labels are suppressed. |
leg |
Include a legend in the vowel plot? If so, for speakers or vowels? If NA, do not generate a legend. Default is "speakers" for vowelplot(). For add.spread.vowelplot() this is a boolean, defaulting to FALSE, which, if TRUE, shows the number of standard deviations depicted by the bars. |
title |
Include a custom main title for the plot? If blank (""), will generate a title based on the data submitted to the function. |
subtitle |
Include a custom subtitle (smaller font title at the bottom) for the plot? If NA, and the vowel data has attributes of "norm.variant" or "unit.type"!="Hertz", the subtitle will default to those values (in that order). Set to blank (""), to have no subtitle, otherwise prints whatever user specifies. |
xlim |
Specify with a two-unit vector (i.e. xlim=c(800, 200)) if you want to override the automatic determination of the size of the plot area. You must provide both xlim and ylim for this take effect. Remember that for other than Bark difference normalized vowels, axes run from largest to smallest value - you must provide the values in the correct order. |
ylim |
Specify with a two-unit vector if you want to override the automatic determination of the size of the plot area. You must provide both xlim and ylim for this take effect. Remember that for other than Bark difference normalized vowels, axes run from largest to smallest value - you must provide the values in the correct order. |
mean.points |
For the add.spread.vowelplot() function only. If TRUE, plot mean data points in addition to the standard deviation bars. Default is FALSE. The "shape" and "size" arguments are ignored if FALSE. |
sd.mult |
For the add.spread.vowelplot() function only. The multiplier for the range of standard deviations plotted by the bars. Default is 2. |
ellipsis |
For the add.spread.vowelplot() function only. Should this plot ellipses rather than standard deviation bars? Default is FALSE. Set to TRUE for ellipsis. As of Vowels 1.2 this makes 'true' ellipsis around the dimensions of variation. For the original version, which plotted horizontal-vertical ellipses only, set to "horizvert". |
separate |
For the add.spread.vowelplot() function only. If FALSE, this generates bars/ellipses collapsed across all speakers in the data. If TRUE, this generates separate bars/ellipses for each speaker. The default is TRUE (note that this default is the opposite of the default action for the compute.means(), compute.sds(), and compute.medians() functions). |
The vowelplot() function provides helpful shortcuts for formatting vowel data frames for plotting in "standard" F2~F1 formats. Cf. Thomas (2001) for a range of examples of vowel plots. The add.vowelplot() function adds more vowel data to an existing plot. It is helpful for adding, for example, mean values to a plot of individual vowels (see examples). The add.spread.vowelplot() function computes and adds standard deviation bars or ellipses to the vowel data.
The "setup" functions - setup.axes(), setup.point.color(), setup.point.shape(), and setup.sizes() - are called by vowelplot() to determine settings for the plots.
Nothing is returned.
The development of the library and this function are ongoing. The arguments to the function may change in future version.
Kendall, Tyler <[email protected]>
with contributions from Santiago Barreda
data(ohiovowels) vowelplot(ohiovowels, color="vowels", label="vowels") vowelplot(norm.bark(ohiovowels), speaker="JOHG09", color="vowels", color.choice=rainbow(length(unique(ohiovowels[,2]))), label="none", title="JOHG09 Bark Difference Normalized Vowels") add.spread.vowelplot(norm.bark(ohiovowels), speaker="JOHG09", sd.mult=1, color.choice=rainbow(length(unique(ohiovowels[,2]))), color="vowels", leg=TRUE) par(mfrow=c(2,1)) vowelplot(compute.means(ohiovowels), shape="vowels") vowelplot(compute.means(norm.lobanov(ohiovowels)), shape="vowels") par(mfrow=c(1,1)) g09.means <- compute.means(ohiovowels, speaker="JOHG09") vowelplot(g09.means, color="vowels", labels="none") add.spread.vowelplot(ohiovowels, speaker="JOHG09", sd.mult=1, color="vowels", labels="none") # can add annotations to the vowel plots as any other R graph, eg: legend("top", legend="Can you guess which vowel is 'BOY'?", col='lightslategrey', bty="n") vowelplot(norm.nearey(ohiovowels), speaker="JOHG09", color="speakers", labels="vowels", title="Individual vowels and means for JOHG09\nNearey1 Normalized") add.vowelplot(compute.means(norm.nearey(ohiovowels), speaker="JOHG09"), color=NA, size=2, labels="vowels") vowelplot(norm.wattfabricius(ohiovowels), speaker="JOHG09", shape="vowels", color="vowels", color.choice=sample(colors(), length(unique(ohiovowels[,2]))), leg="vowels", title="Randomly colored vowels for JOHG09\nWatt & Fabricious normalized")
data(ohiovowels) vowelplot(ohiovowels, color="vowels", label="vowels") vowelplot(norm.bark(ohiovowels), speaker="JOHG09", color="vowels", color.choice=rainbow(length(unique(ohiovowels[,2]))), label="none", title="JOHG09 Bark Difference Normalized Vowels") add.spread.vowelplot(norm.bark(ohiovowels), speaker="JOHG09", sd.mult=1, color.choice=rainbow(length(unique(ohiovowels[,2]))), color="vowels", leg=TRUE) par(mfrow=c(2,1)) vowelplot(compute.means(ohiovowels), shape="vowels") vowelplot(compute.means(norm.lobanov(ohiovowels)), shape="vowels") par(mfrow=c(1,1)) g09.means <- compute.means(ohiovowels, speaker="JOHG09") vowelplot(g09.means, color="vowels", labels="none") add.spread.vowelplot(ohiovowels, speaker="JOHG09", sd.mult=1, color="vowels", labels="none") # can add annotations to the vowel plots as any other R graph, eg: legend("top", legend="Can you guess which vowel is 'BOY'?", col='lightslategrey', bty="n") vowelplot(norm.nearey(ohiovowels), speaker="JOHG09", color="speakers", labels="vowels", title="Individual vowels and means for JOHG09\nNearey1 Normalized") add.vowelplot(compute.means(norm.nearey(ohiovowels), speaker="JOHG09"), color=NA, size=2, labels="vowels") vowelplot(norm.wattfabricius(ohiovowels), speaker="JOHG09", shape="vowels", color="vowels", color.choice=sample(colors(), length(unique(ohiovowels[,2]))), leg="vowels", title="Randomly colored vowels for JOHG09\nWatt & Fabricious normalized")