Description Usage Arguments Details Value Examples
View source: R/collapse_tiers.R
from overlapping tiers
1 2 | collapse_tiers(xdata, timecols = c("start", "end"),
ignore_tiers = NULL, ignore_annos = NULL)
|
xdata |
data.frame, the data object with annotations (e.g. import from ELAN or .rttm file) |
timecols |
character, the column names for start and end of the annotations (default is |
ignore_tiers |
character, at least of length 2, where the first item is the column name for the tiers, and subsequently lists all tier names that should be ignored |
ignore_annos |
character, at least of length 2, where the first item is the column name for the annotations, and subsequently lists all annotation values that should be ignored |
this is a fairly inefficient function (=slow)
Also, in the process annotations are re-ordered such that start time increases.
a matrix with two columns for the start and end times of (collapsed) annotations
1 2 3 4 5 6 7 8 | annos <- LETTERS[1:5]
start <- c(14, 17, 45, 65, 70)
end <- c(25, 23, 60, 80, 82)
duration <- end - start
xdata <- data.frame(start, end, duration, annos)
# second anno is merged into first because it's completely comprised in the first
# last two annos are 'combined' into one
collapse_tiers(xdata = xdata, timecols = c("start", "end"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.