Select audio files that contain photoidentified individuals by matching timings of the audio metadata database with the timing of the relevant metadata of the photoID database. This data frame will be passed to getAudioClip() function to trim audio files with identified individuals.

selectAudios(
  data,
  data_datetime = NULL,
  audio_metadata,
  format_data_datetime = "%Y/%m/%d %H:%M:%S",
  keep_all = FALSE,
  timezone = NULL,
  export = NA
)

Arguments

data

a dataframe containing all the metadata of the photographs audios, as produced by the function getPhotoMetadata(). Important: this dataframe must contain the photo-identification of the individuals, which should be done either manually or semi-automatically

data_datetime

a character giving the column name of the date-time variable.

audio_metadata

a dataframe containing all the metadata of the audio files, as produced by the function getAudioMetadata()

format_data_datetime

character string giving a date-time format as used by strptime. Note that format is ignored if provided when data is a dataframe produced by the function getPhotoMetadata().

keep_all

logical. If TRUE, return all the observations from data, otherwise returns only the pictures matching audios in audio_metadata

timezone

string. Add the correct timezone where the audio files were recorded, as per the R base notation (for additional information, see help(timezomes)). Should this argument be left empty, the time zone will be assumed to be the same as the computer system.

export

full path AND .csv filename to where the dataframe should be exported to. E.g. export = '/Users/you/Database/selected_audios.csv'. Should the data not be exported, export=NA

Value

a data frame with the metadata of the audio files included in the dataframe containing the metadata of the photographs. From this dataframe, the function getAudioClip() will trim audio files with identified individuals.

Author

Mauricio Cantor, Alexandre Machado

Examples

if (FALSE) selected_audios <- selectAudios(audio_metadata = myAudioMetadata, data = myPhotoMetadata, keep_all = FALSE, timezone='America/Sao_Paulo', export = NA)