Skip to content

Commit 690c79a

Browse files
committed
update to reflect CRAN availability
1 parent 406a9ca commit 690c79a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta http-equiv="Content-Style-Type" content="text/css" />
66
<meta name="generator" content="pandoc" />
7-
<title>Normalizing and plotting vowels with phonR 1.0-0</title>
7+
<title>Normalizing and plotting vowels with phonR 1.0-1</title>
88
<style type="text/css">code{white-space: pre;}</style>
99
<style type="text/css">
1010
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
@@ -30,9 +30,9 @@
3030
</head>
3131
<body>
3232
<div id="header">
33-
<h1 class="title">Normalizing and plotting vowels with phonR 1.0-0</h1>
33+
<h1 class="title">Normalizing and plotting vowels with phonR 1.0-1</h1>
3434
<h2 class="author">Daniel R. McCloy, <span class="author">University of Washington</span></h2>
35-
<h4 class="date">Last updated 2015-03-05</h4>
35+
<h4 class="date">Last updated 2015-03-06</h4>
3636
</div>
3737
<!--pandoc
3838
s:
@@ -49,7 +49,7 @@ <h4 class="date">Last updated 2015-03-05</h4>
4949
<h1 id="introduction">Introduction</h1>
5050
<p>The <code>phonR</code> package provides functions for vowel formant frequency and <span class="math">\(f_0\)</span> normalization, as well as a vowel plotting function <code>plotVowels</code> with many advanced features. There are also a few functions for calculating the area of the vowel space (either as a convex polygonal hull or a polygon connecting the mean values of the vowels), and for calculating the repulsive force of the vowel system. <code>phonR</code> also includes sample data in the form of F1 and F2 measurements for eight speakers of Standard Indonesian.</p>
5151
<h2 id="installation">Installation</h2>
52-
<p><code>phonR 1.0-0</code> is not yet available through the <a href="http://cran.r-project.org/package=phonR">Comprehensive R Archive Network</a>, but the source code is hosted on <a href="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/drammock/phonR">GitHub</a> so the package can be installed using <code>devtools::install_github(&quot;drammock/phonR&quot;)</code>. <code>phonR</code> is licensed under <a href="http://www.gnu.org/licenses/gpl.html">GPL-3</a>, and has three dependencies: <code>deldir</code> (for Delaunay triangulations), <code>plotrix</code> (for creating color scales), and <code>splancs</code> (for point-in-polygon functions). Plotting vowels with non-ASCII characters (i.e., most vowel symbols in the IPA) also requires that the user’s computer have a typeface installed that contains glyphs at the necessary codepoints, and that the user specify that typeface when calling the <code>plotVowels</code> function.</p>
52+
<p><code>phonR 1.0-1</code> is available through the <a href="http://cran.r-project.org/package=phonR">Comprehensive R Archive Network</a> and can be installed from within <code>R</code> using <code>install.packages('phonR')</code>. The source code is hosted on <a href="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/drammock/phonR">GitHub</a> so the development version of the package can also be installed using <code>devtools::install_github(&quot;drammock/phonR&quot;)</code>. <code>phonR</code> is licensed under <a href="http://www.gnu.org/licenses/gpl.html">GPL-3</a>, and has three dependencies: <code>deldir</code> (for Delaunay triangulations), <code>plotrix</code> (for creating color scales), and <code>splancs</code> (for point-in-polygon functions). Plotting vowels with non-ASCII characters (i.e., most vowel symbols in the IPA) also requires that the user’s computer have a typeface installed that contains glyphs at the necessary codepoints, and that the user specify that typeface when calling the <code>plotVowels</code> function.</p>
5353
<p>To run the examples in this tutorial yourself, you need to load <code>phonR</code> and the accompanying sample data:</p>
5454
<pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(phonR)
5555
<span class="kw">data</span>(indoVowels) <span class="co"># provides dataframe &#39;indo&#39;</span></code></pre>
@@ -311,7 +311,7 @@ <h1 id="appendix-fonts-ipa-and-unicode">Appendix: Fonts, IPA, and Unicode</h1>
311311
<h2 id="interactive-plotting-vs.-direct-to-file">Interactive plotting vs. direct-to-file</h2>
312312
<p>Many R front-ends provide a GUI for capturing generated plots and saving them in different file formats. In many cases this works seamlessly, but in other cases it has been the case that custom fonts specified with the <code>family</code> argument are properly displayed on screen, but not when the plot window contents are saved to file. It is strongly recommended that you use <code>phonR</code>’s built-in capability to save direct-to-file when you want file output, rather than using <code>plotVowels(..., output=&quot;screen&quot;)</code> and then saving the plot from the GUI.</p>
313313
<h2 id="choosing-an-ipa-font">Choosing an IPA font</h2>
314-
<p>Gone are the days when the only unicode-compliant option for IPA transcription was the <a href="http://scripts.sil.org/doulossil_download">Doulos SIL</a> typeface. The plots above use <a href="http://scripts.sil.org/charissil_download">Charis SIL</a>, which (unlike Doulos SIL) has bold, italic, and bold-italic faces in addition to regular. In my experience Charis SIL aligns diacritics better than any of its competitors, but the following three fonts also have sufficiently respectable coverage of IPA codepoints to be usable in most documents concerning phonetics or phonology: <a href="http://mplus-fonts.sourceforge.jp/">M+</a>, <a href="http://www.stixfonts.org/">STIX</a>, and <a href="http://www.linuxlibertine.org/">Linux Libertine O</a> (despite its name, Linux Libertine O will work on any operating system, not just Linux). All of these typefaces are free; M+ comes in an impressive range of weights and has both proportional and monospaced variants, and is the best sans-serif typeface I have found for rendering IPA glyphs.</p>
314+
<p>Gone are the days when the only unicode-compliant option for IPA transcription was the <a href="http://scripts.sil.org/doulossil_download">Doulos SIL</a> typeface. Some of the plots above use <a href="http://scripts.sil.org/charissil_download">Charis SIL</a>, which (unlike Doulos SIL) has bold, italic, and bold-italic faces in addition to regular. In my experience Charis SIL aligns diacritics better than any of its competitors, but the following three fonts also have sufficiently respectable coverage of IPA codepoints to be usable in most documents concerning phonetics or phonology: <a href="http://mplus-fonts.sourceforge.jp/">M+</a>, <a href="http://www.stixfonts.org/">STIX</a>, and <a href="http://www.linuxlibertine.org/">Linux Libertine O</a> (despite its name, Linux Libertine O will work on any operating system, not just Linux). All of these typefaces are free; M+ comes in an impressive range of weights and has both proportional and monospaced variants, and is the best sans-serif typeface I have found for rendering IPA glyphs.</p>
315315
<h2 id="working-with-unicode-ipa-glyphs-in-microsoft-windows">Working with Unicode IPA glyphs in Microsoft Windows</h2>
316316
<p>Perhaps the easiest way to have a pleasant experience working with Unicode-compliant representations of IPA glyphs is to use a computer running a Linux operating system: <code>R</code> on Linux defaults to a UTF-8 locale, which means that non-ASCII glyphs can be displayed in the <code>R</code> command console (both in commands you type/paste in, and in <code>R</code>’s output) and can be used in plots without issue. Do not bother trying to get that to work on Windows by changing <code>R</code>’s locale parameter to UTF-8 on Windows. It will not work. If you want to be able to view and type non-ASCII characters in the <code>R</code> console, use Linux.</p>
317317
<p>If you do use Windows, here are some key pieces of information that will allow you to work with Unicode IPA glyphs in <code>R</code> more easily. First: Microsoft Excel does not output UTF-8 encoded text files. If you try to save a spreadsheet from Excel as plain CSV, all the non-ASCII glyphs will be corrupted (i.e., each non-ASCII codepoint will be converted to a <code>?</code> character). If you export from Excel as “Unicode text”, what you get is tab-separated values encoded in “UCS2-LE” format (AKA, “UTF-16 little-endian with BOM”). The easiest route to opening this in <code>R</code> is to first convert it to UTF-8 (e.g., with the “Encoding” menu in the free text editor <a href="http://notepad-plus-plus.org/">Notepad++</a>) and then read the data in <code>R</code> via <code>read.delim(..., encoding=&quot;UTF-8&quot;)</code>. To open “UCS-2LE” encoded files directly in <code>R</code> is a complicated process, but can be done; it involves reading in the file as raw text, splitting each line on the tab characters, collapsing the resulting list into a matrix using <code>rbind</code>, converting to a data frame, and finally manually converting any columns containing numeric or logical data to the proper mode. A sample of this method is given below:</p>

phonR.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Normalizing and plotting vowels with phonR 1.0-0"
2+
title: "Normalizing and plotting vowels with phonR 1.0-1"
33
runningtitle: "phonR 1.0-0 vignette"
44
author:
55
- name: Daniel R. McCloy
@@ -31,7 +31,7 @@ options(width=90)
3131
The `phonR` package provides functions for vowel formant frequency and $f_0$ normalization, as well as a vowel plotting function `plotVowels` with many advanced features. There are also a few functions for calculating the area of the vowel space (either as a convex polygonal hull or a polygon connecting the mean values of the vowels), and for calculating the repulsive force of the vowel system. `phonR` also includes sample data in the form of F1 and F2 measurements for eight speakers of Standard Indonesian.
3232

3333
## Installation
34-
`phonR 1.0-0` is not yet available through the [Comprehensive R Archive Network](http://cran.r-project.org/package=phonR), but the source code is hosted on [GitHub](https://github.com/drammock/phonR) so the package can be installed using `devtools::install_github("drammock/phonR")`. `phonR` is licensed under [GPL-3](http://www.gnu.org/licenses/gpl.html), and has three dependencies: `deldir` (for Delaunay triangulations), `plotrix` (for creating color scales), and `splancs` (for point-in-polygon functions). Plotting vowels with non-ASCII characters (i.e., most vowel symbols in the IPA) also requires that the user’s computer have a typeface installed that contains glyphs at the necessary codepoints, and that the user specify that typeface when calling the `plotVowels` function.
34+
`phonR 1.0-1` is available through the [Comprehensive R Archive Network](http://cran.r-project.org/package=phonR) and can be installed from within `R` using `install.packages('phonR')`. The source code is hosted on [GitHub](https://github.com/drammock/phonR) so the development version of the package can also be installed using `devtools::install_github("drammock/phonR")`. `phonR` is licensed under [GPL-3](http://www.gnu.org/licenses/gpl.html), and has three dependencies: `deldir` (for Delaunay triangulations), `plotrix` (for creating color scales), and `splancs` (for point-in-polygon functions). Plotting vowels with non-ASCII characters (i.e., most vowel symbols in the IPA) also requires that the user’s computer have a typeface installed that contains glyphs at the necessary codepoints, and that the user specify that typeface when calling the `plotVowels` function.
3535

3636
To run the examples in this tutorial yourself, you need to load `phonR` and the accompanying sample data:
3737

@@ -268,7 +268,7 @@ It would be quite a shame to put so much effort into creating beautiful vowel pl
268268
Many R front-ends provide a GUI for capturing generated plots and saving them in different file formats. In many cases this works seamlessly, but in other cases it has been the case that custom fonts specified with the `family` argument are properly displayed on screen, but not when the plot window contents are saved to file. It is strongly recommended that you use `phonR`’s built-in capability to save direct-to-file when you want file output, rather than using `plotVowels(..., output="screen")` and then saving the plot from the GUI.
269269

270270
## Choosing an IPA font
271-
Gone are the days when the only unicode-compliant option for IPA transcription was the [Doulos SIL](http://scripts.sil.org/doulossil_download) typeface. The plots above use [Charis SIL](http://scripts.sil.org/charissil_download), which (unlike Doulos SIL) has bold, italic, and bold-italic faces in addition to regular. In my experience Charis SIL aligns diacritics better than any of its competitors, but the following three fonts also have sufficiently respectable coverage of IPA codepoints to be usable in most documents concerning phonetics or phonology: [M+](http://mplus-fonts.sourceforge.jp/), [STIX](http://www.stixfonts.org/), and [Linux Libertine O](http://www.linuxlibertine.org/) (despite its name, Linux Libertine O will work on any operating system, not just Linux). All of these typefaces are free; M+ comes in an impressive range of weights and has both proportional and monospaced variants, and is the best sans-serif typeface I have found for rendering IPA glyphs.
271+
Gone are the days when the only unicode-compliant option for IPA transcription was the [Doulos SIL](http://scripts.sil.org/doulossil_download) typeface. Some of the plots above use [Charis SIL](http://scripts.sil.org/charissil_download), which (unlike Doulos SIL) has bold, italic, and bold-italic faces in addition to regular. In my experience Charis SIL aligns diacritics better than any of its competitors, but the following three fonts also have sufficiently respectable coverage of IPA codepoints to be usable in most documents concerning phonetics or phonology: [M+](http://mplus-fonts.sourceforge.jp/), [STIX](http://www.stixfonts.org/), and [Linux Libertine O](http://www.linuxlibertine.org/) (despite its name, Linux Libertine O will work on any operating system, not just Linux). All of these typefaces are free; M+ comes in an impressive range of weights and has both proportional and monospaced variants, and is the best sans-serif typeface I have found for rendering IPA glyphs.
272272

273273
## Working with Unicode IPA glyphs in Microsoft Windows
274274
Perhaps the easiest way to have a pleasant experience working with Unicode-compliant representations of IPA glyphs is to use a computer running a Linux operating system: `R` on Linux defaults to a UTF-8 locale, which means that non-ASCII glyphs can be displayed in the `R` command console (both in commands you type/paste in, and in `R`’s output) and can be used in plots without issue. Do not bother trying to get that to work on Windows by changing `R`’s locale parameter to UTF-8 on Windows. It will not work. If you want to be able to view and type non-ASCII characters in the `R` console, use Linux.

0 commit comments

Comments
 (0)