xsampatoIPA: Convert X-Sampa to IPA

Description Usage Arguments Details Value Author(s) References Examples

View source: R/xsampatoIPA.R

Description

Convert a vector of x-sampa vowel descriptions to values that can be used to plot IPA.

Usage

1
xsampatoIPA (vowels, chart = FALSE, verify = FALSE)

Arguments

vowels

A vector representing vowel labels in x-sampa to be converted to values that can be used to plot the corresponding IPA symbols. If this is not provided a plot comparing IPA to x-sampa representations is displayed.

chart

If TRUE, a plot comparing IPA to x-sampa representations is displayed.

verify

If TRUE, the selected symbols are plotted to allow for verification.

Details

This function converts x-sampa to values that can be used to plot IPA symbols by passing them to the 'pch' parameter within plotting functions. At the moment it has only been implemented for vowel sounds. The function also generate a figure comparing IPA to x-sampa vowel representations that may be useful to some users.

**There may be issues when exporting figures to PDF using IPA font. Exporting plots directly as images works 'out of the box'**

Value

A vector of the same length as 'vowels', with the values required to plot the desired vowels.

Author(s)

Santiago Barreda <[email protected]>

References

http://en.wikipedia.org/wiki/X-SAMPA

Examples

1
2
3
4
5
## compare x-sampa and IPA vpwel charts
#xsampatoIPA ()
## some examples
#IPA = xsampatoIPA (c('I','3','e','Q'))
#plot (1:5, pch = IPA, cex = 2)

phonTools documentation built on May 29, 2017, 9 a.m.