Workshop: Week 3
Complete Task A and then pick of the other two tasks.
If you are unsure about anything, please ask us for directions!
The tasks are designed for you to practice this week’s R skills.
Read the
coretta2021/alb-vot.csv
data.Calculate the VOT based on the
release
andvoi_onset
columns. (VOT is the time lag between the voicing onset and the consonant release).Create a new column that specifies the voicing of the consonant (voiced or voiceless) based on the value in
label
.ifelse()
orcase_when()
are useful.Get summary measures of VOT for voiceless and voiced consonants. Can the VOT differentiate between the two voicing categories?
Read the
coretta2021/alb_formants.rds
data.Create a scatter plot of F1 and F2, with points coloured by
vowel
. Are the vowels in the places you’d expect them to be?Now create another scatter plot with F1 and vowel duration. You need to calculate vowel duration first from
start
andend
. Can you notice any patterns in the relationship between F1 and vowel duration?
Read the
sluckin2022/everywhere-loc.csv
data. The data are acceptability judgements on the impersonal use of “everywhere”, like in the sentence “Everywhere here can say this”.The
Restrictor
column tells you if the sentence has a restrictor, like in “Everywhere on the coast eats fish and chips.” vs no restrictor “Everywhere takes credit cards these days.” TheValue
column gives you the acceptability rating from 1 to 7.Mutate the
Restrictor
column so that 0 = “no restrictor” and 1 = “restrictor”.Mutate the
Value
column so that it is a character column (useas.character()
).Create a filled stacked bar chart by
Restrictor
with fill byValue
and panels byAge
. Can you spot differences in rating across different age brackets?
For feedback, ask us in class and/or send your work to Stefano and/or come to Stefano’s office hours (you can also come in groups).
We will not provide you with model answers, so make sure you make the most of us in person.