---
title: "Use cases"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

Initially please make sure the `course_data_dir` and `course_data_url` variables are set:

```{r,echo=T}
course_data_dir = "./myEMURdata" # change to valid dir path on your system
course_data_url = "http://www.phonetik.uni-muenchen.de/~jmh/lehre/Rdf"
```


```{r,echo=F, eval=F}
# clean up 
dir = "./myEMURdata/emuR_demoData"
if(dir.exists(dir)){
  unlink(dir, recursive = T)
}
```


All the Q & A's are based on the `ae_emuDB` that comes with the emuR package:

```{r,echo=T, eval=F}
library(emuR)
create_emuRdemoData(course_data_dir)
db = load_emuDB(file.path(course_data_dir, "emuR_demoData", "ae_emuDB"),
                verbose = F)
```

You will need the following R packages:

```{r, message=F}
library(emuR)
library(tidyverse) # this includes dplyr and ggplot2
```


## Q & A's

**Please place your answers in the R Markdown code blocks or write the answers next to the A:**

### Use Cases

- **Q**: *What is the average length of all n phonetic segments in the ae emuDB?*
- **A**:

```{r}
# place answer code here
```

- **Q**: *What does the F1 and F2 distribution of all phonetic segments that contain the labels I, o:, u:, V or @ look like?*
- **A**:

```{r}
# place answer code here
```


- **Q**: *What words do the phonetic segments that carry the labels s, z, S or Z in the ae emuDB occur in and what is their phonetic context?*
- **A**:

```{r}
# place answer code here
```


- **Q**: *What words do the phonetic segments that carry the labels s, z, S or Z in the ae emuDB occur in and what is their phonetic context?*
- **A**:

```{r}
# place answer code here
```

- **Q**: *Do the phonetic segments that carry the labels s, z, S or Z in the ae emuDB differ with respect to their first spectral moment?*
- **A**:

```{r}
# place answer code here
```
