mapPrefix {DramaAnalysis} | R Documentation |
Replace corpus prefix
Description
This function can be used to replace corpus prefixes. If a list of play ids contains textgrid prefixes, for instance, this function can be used to map them onto GerDraCor prefixes. Please note that the function does not check whether the play actually exists in the corpus.
Usage
mapPrefix(idList, map)
Arguments
idList |
The list of ids in which we want to replace. |
map |
A list containing the old prefix as name and the new one as values. |
Value
The function returns a list of the same length of the input list, but with replaced play prefixes.
Examples
# returns c("corpus2:play1", "corpus2:play2")
mapPrefix(c("corpus1:play1", "corpus1:play2"), list(corpus1="corpus2"))
[Package DramaAnalysis version 3.0.2 Index]