getConditions {voiceR}R Documentation

Get Conditions

Description

Retrieves the experimental conditions from the file name following a naming pattern in which the various components (IDs, conditions, and dimensions) are separated by a non-alphanumeric character.

Usage

getConditions(
  path = ".",
  audioList = list(),
  fileType = "wav",
  fileNamePattern = "ID_Condition_Dimension",
  sep = "_",
  filter = NULL,
  recursive = FALSE
)

Arguments

path

A character string indicating the path to the folder containing the audio files. Default corresponds to the current working directory.

audioList

Optional list with Wave objects to analyze.

fileType

Character string indicating the file format (wav or mp3) of the audio files. Default corresponds to wav.

fileNamePattern

Character string indicating the naming format of the audio files, such as "ID-Condition-Dimension", "Condition_ID_Dimension" or "ID". Default corresponds to "ID_Condition_Dimension".

sep

A non alpha-numeric that acts as separator between the different naming components. Default corresponds to underscore.

filter

Optional character vector used to filter for specific audio files. Default corresponds to NULL.

recursive

A logical value indicating whether subdirectories should be included when searching for voice files. Default corresponds to FALSE.

Value

Character vector, which contains all the unique conditions of the voice files extracted from the name pattern of the audio files.

Examples

getConditions(audioList = testAudioList,
fileNamePattern = "ID_Condition_Dimension", sep = "_")


[Package voiceR version 0.1.0 Index]