This function will read winning analyses into R based on the content of the 'winners.csv' file. The required formant and csv data can be pre-loaded with the readformants() and readcsvs() functions provided in this package. Reading the formant data can be a bit slow so loading it once and passing it to the function will speed things up quite a bit if this function will be called repeatedly.

getwinners(
  path = NA,
  formants = NA,
  winners = NA,
  selection_info = NA,
  asone = TRUE,
  write_csv = FALSE,
  move_formants = FALSE
)

Arguments

path

the path to the working directory for the Fast Track project. If no path is provided this is the working directory.

formants

an optional list of lists representing all of the possible formant analyses.

winners

an optional dataframe representing the data in the 'winners.csv' file.

selection_info

--.

asone

if TRUE, the formant data is stuck together into one dataframe and filenames are indicated in a new column. If FALSE, a list of dataframes is returned and each list element is named after the file.

write_csv

if TRUE, the data is written out to a CSV folder in the working directory.

move_formants

--.

Value

A dataframe or list of dataframes, as per the asone parameter.

Details

At the moment the function does not move copies of the winning formant files into a new folder (as with the Praat version) but that functionality is coming soon.

Examples

if (FALSE) { getwinners () tmp = getwinners (getwd(), winners$winners, formants, write = TRUE) }