read.soundcorrs: Read data for a single language from a tsv file.

Description Usage Arguments Details Value See Also Examples

Description

Read the data for one language, from a file in the wide format, and combine it with metadata into a soundcorrs object. To obtain a soundcorrs object containing data for multiple languages, see merge.soundcorrs.

Usage

1
read.soundcorrs(file, name, col.aligned, transcription, separator = "\\|")

Arguments

file

[character] Path to the data file in the wide format.

name

[character] Name of the language.

col.aligned

[character] Name of the column with the aligned words.

transcription

[character] Path to the file with the transcription.

separator

[character] String used to separate segments in col.aligned. Defaults to "\|".

Details

The constructor for the soundcorrs class requires a data frame and a transcription object which means that the user would need to first read both from a file, and only then pass them to the constructor. This function saves these two steps. In addition, it attaches the name of the file to the object, which allows for easier identification later. It is recommended to use read.soundcorrs instead of the raw soundcorrs constructor whenever possible.

Value

[soundcorrs] An object containing the data and metadata for one language.

See Also

soundcorrs

Examples

1
2
3
4
5
# path to sample data in the "wide format"
fNameData <- system.file ("extdata", "data-ie.tsv", package="soundcorrs")
# path to a sample transcription
fNameTrans <- system.file ("extdata", "trans-common.tsv", package="soundcorrs")
ger <- read.soundcorrs (fNameData, "Latin", "LATIN", fNameTrans)

soundcorrs documentation built on Nov. 16, 2020, 5:09 p.m.