annotate_textgrid: Annotate textgrid

Description Usage Arguments Value Author(s) Examples

View source: R/annotate_textgrid.R

Description

Annotates textgrids. It is possible to define step in the argument "each", so each second element of the tier will be annotated.

Usage

1
2
3
4
5
6
7
8
annotate_textgrid(
  annotation,
  textgrid,
  tier = 1,
  each = 1,
  backup = TRUE,
  write = TRUE
)

Arguments

annotation

vector of stimuli

textgrid

character with a filename or path to the TextGrid

tier

value that could be either ordinal number of the tier either name of the tier

each

non-negative integer. Each element of x is repeated each times

backup

logical. If TRUE (by default) it creates a backup tier.

write

logical. If TRUE (by dafault) it overwrites an existing tier.

Value

a string that contain TextGrid. If argument write is TRUE, then no output.

Author(s)

George Moroz <agricolamz@gmail.com>

Examples

1
2
3
4
5
6
7
8
annotate_textgrid(
  annotation = c("", "t", "e", "s", "t"),
  textgrid = system.file("extdata",
    "test.TextGrid",
    package = "phonfieldwork"
  ),
  tier = 2, write = FALSE
)

phonfieldwork documentation built on March 3, 2021, 1:12 a.m.