-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplotMeans.R
More file actions
24 lines (19 loc) · 775 Bytes
/
plotMeans.R
File metadata and controls
24 lines (19 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library("ggplot2")
library("dplyr")
library("tidyr")
df <- read.csv("socioPhoWorkData_20160716_fixed.csv",T)
summary(df)
df <- df[df$duration > .03,]
df.sydS <- df[df$corpus=="SydS",]
df.means <- df.sydS[df.sydS$vowel %in% c("BATH", "DRESS", "FOOT", "FORCE", "GOOSE", "KIT", "LOT", "NURSE", "START", "STRUT", "THOUGHT", "TRAP") &
df.sydS$percentage=="50",] %>%
group_by(vowel, grammatical, age) %>%
summarise(F1_norm = mean(F1_norm),
F2_norm = mean(F2_norm),
F1 = mean(F1),
F2 = mean(F2))
ggplot(df.means, aes(F2_norm, F1_norm, color=vowel))+
geom_text(aes(label=vowel), size=8)+
scale_x_reverse() + scale_y_reverse()+
theme_bw() +
facet_wrap(~age+grammatical, labeller=label_wrap_gen(multi_line=F))