df_to_tier {phonfieldwork} | R Documentation |
Dataframe to TextGrid's tier
Description
Convert a dataframe to a Praat TextGrid.
Usage
df_to_tier(df, textgrid, tier_name = "", overwrite = TRUE)
Arguments
df |
an R dataframe object that contains columns named "content", "time_start" and "time_end" |
textgrid |
a character with a filename or path to the TextGrid |
tier_name |
a vector that contain a name for a created tier |
overwrite |
a logic argument, if |
Value
If overwrite
is FALSE
, then the function returns a
vector of strings with a TextGrid. If overwrite
is TRUE
, then
no output.
Author(s)
George Moroz <agricolamz@gmail.com>
Examples
time_start <- c(0.00000000, 0.01246583, 0.24781914, 0.39552363, 0.51157715)
time_end <- c(0.01246583, 0.24781914, 0.39552363, 0.51157715, 0.65267574)
content <- c("", "T", "E", "S", "T")
df_to_tier(data.frame(id = 1:5, time_start, time_end, content),
system.file("extdata", "test.TextGrid",
package = "phonfieldwork"
),
overwrite = FALSE
)
[Package phonfieldwork version 0.0.17 Index]