Needless to say, we’ll need to change our plotting methods now that we’re dealing with dynamic formant trajectories rather than static single-point measures. Let’s combine these two functions into one big pipe chain, and save it to a new dataframe called traj.tidy (the arrange() command in the final line of code is simply to order the rows by the token_id column, and is completely optional) We can split this into two separate columns using the separate() function. At the moment, our measure_type column conflates two things that we really need to separate: the formant number (i.e. F1 or F2) and the time point in the vowel (i.e. 5%, 10% etc.). To do this, we can use gather() to - as the name suggests - gather all of these columns together and split them into just two columns: one called value, which is the actual formant measurement, and one called measure_type, which tells us what that value corresponds to.īut that’s not all. To demonstrate with a non-linguistic example, the following dataset is in ‘wide’ format because there are multiple observations per row (it’s the number of words spoken per episode by members of the Stark family in season 1 of Game of Thrones) # A tibble: 6 x 11 In other words, rather than having one vowel token per row, with each formant at each time point measured in its own column, we want just one column with all of our formant values, and another column telling us which formant, and which time point, each value corresponds to. In our case, it involves moving from a wide data format (i.e. with lots of columns) into a long format (i.e. with lots of rows instead!). You’ll notice immediately that we have a lot of columns! This is unavoidable when dynamic formant data because, depending on the time resolution, a single vowel token will be represented by many different formant values.Īnother thing we need to do before plotting these vowel trajectories is to make the data ‘tidy’ (read about this here). ![]() ![]() ![]() Colnames(traj) # "token_id" "speaker" "time" "vowel"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |