tiers_rename: Rename tiers

View source: R/tiers_rename.R

tiers_renameR Documentation

Rename tiers

Description

Renames all tiers in all transcript objects of a corpus. If only certain transcripts should be affected set the parameter filterTranscriptNames. In case that you want to select transcripts by using regular expressions use the function act::search_makefilter first.

Usage

tiers_rename(x, searchPattern, searchReplacement, filterTranscriptNames = NULL)

Arguments

x

Corpus object.

searchPattern

Character string; search pattern as regular expression.

searchReplacement

Character string; replacement string.

filterTranscriptNames

Vector of character strings; names of the transcripts to be included.

Details

The tiers will only be renamed if the resulting names preserve the uniqueness of the tier names. Results will be reported in @history of the transcript objects. Please be aware that this function is not optimized for speed and may take quite a while to run, depending on the size of your corpus object.

Value

Corpus object.

See Also

tiers_add, tiers_convert, tiers_rename, tiers_sort, helper_tiers_new_table, helper_tiers_sort_table

Examples

library(act)

# Check the names of the existing tiers in the first two transcripts
examplecorpus@transcripts[[1]]@tiers$name
examplecorpus@transcripts[[2]]@tiers$name

x <- act::tiers_rename(examplecorpus, "Entrevistador", "E")

x@transcripts[[1]]@tiers$name
x@transcripts[[2]]@tiers$name


act documentation built on June 7, 2023, 6:16 p.m.