# Emu and R/Splus

Emu started it's life as a set of extensions to the Splus statistical language. APS and the later MU+ systems were mainly a set of functions written in Splus with a small backend written in C to perform file i/o and database queries. One of the design goals of Emu was to release the system from Splus and make it a more general standalone package that could be called from other environments. However, Splus still remains the major analysis environment used in SHLRC and elsewhere for data derived from Emu databases. The Splus functions are actively maintained and extended by researchers in SHLRC. Until now, this code has only been available to those who knew to ask for it, I've now managed to package the code up into an installable package so that perhaps it can now get wider use.

Splus is a commercial product of Insightful which runs on Unix and MS Windows based systems. It is a programming language and analysis environment which provides lots of built in functions for statistical analysis and visualisation. The R project has built a freely available clone of Splus which is largely source compatible and again runs on Unix and MS Windows platforms. If you are already an Splus user then you can download the Emu/Splus code and work within that environment. If you wish to evaluate this software as an analysis environment for speech data I recommend that you try R and then perhaps look at Splus if you want some of the additional features it offers as a commercial package. At SHLRC we largely use Splus for research and R for teaching since it can be given to students for free; both systems are actively supported.

Installation procedures for R and Splus are different. The R package is a zip or tar.gz file which must be unpacked in the R library directory. The Splus package is more complicated since Splus functions are stored in a binary format, installation instructions are included with each package. The Emu/Splus and Emu/R packages can be downloaded from Sourceforge.

You can find a download site for the latest version of R on the main CRAN site or one if it's many mirrors.

Splus can be purchased from Insightful Inc..

## Documentation

The Splus/R functions are documented partially in the main Emu manual. In addition, individual function documentation is included with the distribution. In R, this is integrated into the online help facility; with Splus you can access them separately via a web browser. This documentation is available online here.

## Installing Emu/R

Installation of the Emu functions for R is simple. Download either the zip (emu_R_VERSION.zip, for Windows/Mac) or tar.gz (emu_R_VERSION.tar.gz, for Unix) version of the package. To install on windows, choose "Install package from local file..." from the R menubar and select the zip file. On the Macintosh, save the zip file in the 'library' folder of your R installation and unpack it with Stuffit Expander. This should create the Emu folder within the library folder. On unix, run the command:

R INSTALL emu

You will need to have root privileges and have the emu archive (tar.gz) in the current directory for this to work.

## Installing Emu/Splus

Unpack the zip/tar file in a working directory. This will create a directory emu-S with this file (INSTALL.txt) and the Splus source code for the Emu library (Ssource) along with a directory containing the html help files for Emu/Splus functions.

Create a directory for Emu in your Splus library directory, this might be "C:\Spluswin\library" so you would create "C:\Spluswin\library\emu" and "C:\Spluswin\library\emu\_Data" (on Unix, this is .Data not _Data)

Start up Splus and attach this _Data (.Data) directory in position 1:

attach( "C:\\Spluswin\\library\\emu\\_Data", pos=1 )

now source the Emu/Splus source code:

source( "C:\Path\to\emu-S\Ssource" )

now quit Splus.

Restart Splus and you should be able to invoke the Emu library:

library(emu)

you should see a message like:

EMU Speech Database system
Version  1.0 (C) SHLRC, Macquarie University, 1998


for help please consult the Emu manual and the html web pages included in the distribution.