Workshop: Week 3

Instructions
  • Pick two of the following tasks and work through them in group.

  • If you are unsure about anything, please ask us for directions!

  • The tasks are designed for you to practice this week’s R skills.

Task A: Albanian Voice Onset Time
  • Read the coretta2021/alb-vot.csv data.

  • Calculate the VOT based on the release and voice_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() or case_when() are useful.

  • Get summary measures of VOT for voiceless and voiced consonants. Can the VOT differentiate between the two voicing categories?

Task B: Albanian vowels
  • 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 and end. Can you notice any patterns in the relationship between F1 and vowel duration?

Task C: ‘Everywhere here can say this’
  • Read the slukin2022/everywhere-loc.csv data. The data are acceptability judgments 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.” The Value 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 (use as.character()).

  • Create a filled stacked bar chart by Restrictor with fill by Value and panels by Age. Can you spot differences in rating across different age brackets?

Feedback

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.