Learn R Programming

soundcorrs (version 0.4.0)

read.transcription: Read transcription from a tsv file.

Description

Read a table from file and create a transcription object out of it.

Usage

read.transcription(
  file,
  col.grapheme = "GRAPHEME",
  col.meta = "META",
  col.value = "VALUE"
)

Arguments

file

[character] Path to the data file.

col.grapheme

[character] Name of the column with graphemes. Defaults to "GRAPHEME".

col.meta

[character] Name of the column with the coverage of metacharacters. If empty string or NA, the column will be generated automatically. Defaults to "META".

col.value

[character] Name of the column with values of graphemes. Defaults to "VALUE".

Value

[transcription] A transcription object containing the read transcription.

Details

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

See Also

transcription

Examples

Run this code
# NOT RUN {
# path to a sample transcription
fName <- system.file ("extdata", "trans-common.tsv", package="soundcorrs")
read.transcription (fName)
# }

Run the code above in your browser using DataLab