Learn R Programming

soundcorrs (version 0.4.0)

addSeparators: Intersperse a vector of strings with a character or string.

Description

Primarily intended to insert separators into a column of words, to facilitate manual segmentation and aligning.

Usage

addSeparators(x, separator = "|")

Arguments

x

[character vector] The strings to be interspersed.

separator

[character] The string with which to intersperse. Defaults to "|".

Value

[character vector] A vector of interspersed strings.

Details

Preparation of data for soundcorrs consists of segmentation and alignment. Segmentation can proceed on phoneme-by-phoneme, morpheme-by-morpheme, or any other basis; the only constraint is that each word in a pair/triple/... of words must contain the same number of segments. Segments are indicated by separators, by default the character "|". The action of inserting separators, potentially between every two letters, in a large dataset, can become time consuming. addSeparators automates at least this part of the process.

Examples

Run this code
# NOT RUN {
addSeparators (c("word","mot","focal"), ".")
# }

Run the code above in your browser using DataLab