Learn R Programming

soundcorrs (version 0.2.0)

transcription: Constructor function for the transcription class.

Description

Take a data frame containing transcription and turn it into a transcription object, as required by the soundcorrs constructor function. In the normal workflow, the user should have no need to call this function other than through read.transcription.

Usage

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

Arguments

data

[data.frame] Data frame containing the transcription and its meaning.

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 provided data.

Fields

data

[data.frame] The original data frame.

cols

[character list] Names of the important columns in the data frame.

zero

[character] A regular expression to catch linguistic zeros.

Examples

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

Run the code above in your browser using DataLab