Learn R Programming

soundcorrs (version 0.1.1)

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

Description

Read the data for one language, from a file in the wide format, and combine it with metadata into a scOne object.

Usage

read.scOne(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 "\|".

Value

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

Examples

Run this code
# NOT RUN {
# path to sample data in the "wide format"
fNameData <- system.file ("extdata", "data-capitals.tsv", package="soundcorrs")
# path to a sample transcription
fNameTrans <- system.file ("extdata", "trans-common.tsv", package="soundcorrs")
ger <- read.scOne (fNameData, "German", "ALIGNED.German", fNameTrans)
# }

Run the code above in your browser using DataLab