Daten & Packages laden

Laden Sie die folgenden Packages und Data Frames:

library(tidyverse)
library(gridExtra)
urla = "https://www.phonetik.uni-muenchen.de/studium_lehre/"
urlb = "lehrmaterialien/R_speech_processing/Rdf"
url = paste0(urla, urlb)
clara = read.table(file.path(url, "clara.txt"), stringsAsFactors = T)
preasp = read.table(file.path(url, "preasp.txt"), stringsAsFactors = T)
vdata = read.table(file.path(url, "vdata.txt"), stringsAsFactors = T)
asp = read.table(file.path(url, "asp.df.txt"), stringsAsFactors = T)
glottal = read.table(file.path(url, "glottal.txt"), stringsAsFactors = T)
dg = read.table(file.path(url, "dg.txt"), stringsAsFactors = T)
franken = read.table(file.path(url, "franken.txt"), stringsAsFactors = T)
h.df = read.table(file.path(url, "hruch.txt"), stringsAsFactors = T)
geraet = read.table(file.path(url, "ger.df.txt"), stringsAsFactors = T)
asp %>% 
  ggplot() +
  aes(x = Stress, fill = C) +
  geom_bar(position = "fill") +
  ylab("Proportion")

vdata %>%
  ggplot() +
  aes(y = F2, x = Subj) +
  geom_boxplot() +
  geom_hline(yintercept = 1500)

preasp %>%
  filter(vdur > 0.09 & vdur < 0.18) %>%
  ggplot() + 
  aes(x = region, fill = vtype) +
  geom_bar()

franken %>%
  ggplot() +
  aes(x = Response, fill = Alter) +
  geom_bar(position = "fill") +
  facet_wrap(~Phon)

clara %>%
  ggplot() + 
  aes(x = prdur, y = ddur) +
  geom_point() + 
  xlab("Wortdauer") +
  ylab("Prä-Aspirationsdauer") +
  facet_wrap(~pos)

glottal %>% 
  ggplot() +
  aes(x = verschluss, fill = erkannt) +
  geom_bar(position = "fill") +
  ylab("Proportion")

dg %>%
  ggplot() +
  aes(y = F2, x = Region) +
  geom_boxplot() +
  facet_wrap(~Gen) +
  ylab("F2 (Hz)")

# oder
dg %>%
  ggplot() +
  aes(y = F2, x = Region, fill = Gen) +
  geom_boxplot() +
  ylab("F2 (Hz)")

p1 = h.df %>%
  ggplot() +
  aes(y = VOT, x = Alter) +
  geom_boxplot()
p2 = h.df %>%
  ggplot() +
  aes(y = VOT, x = Verschluss, col = Alter) +
  geom_point()
grid.arrange(p1, p2, ncol=2)

preasp %>%
  ggplot() +
  aes(y = clodur, x = cplace, fill = cplace) +
  geom_boxplot() +
  facet_wrap(~region)

 geraet %>%
  group_by(Vpn) %>%
  summarise(d = diff(kiefer)) %>%
  ungroup() %>%
  ggplot() +
  aes(y = d) +
  geom_boxplot() +
  geom_hline(yintercept = 0, col = "red") +
  ylab("Differenz (mm)") +
  theme(axis.text.x = element_blank())