Learn R Programming

warbleR (version 1.1.1)

checkwavs: Check .wav files

Description

checkwavs checks whether .wav files can be read by subsequent functions.

Usage

checkwavs()

Arguments

Value

  • If all .wav files are ok, returns message "All files are ok!". Otherwise returns "These file(s) cannot be read" message with names of the corrupted .wav files.

Details

This function has no associated arguments, although users must set the working directory where they wish to check .wav files beforehand.

Examples

Run this code
# First create empty folder
setwd(tempdir())

# save wav file examples
data(list = c("Phae.long1", "Phae.long2", "Phae.long3"))
writeWave(Phae.long1,"Phae.long1.wav")
writeWave(Phae.long2,"Phae.long2.wav")
writeWave(Phae.long3,"Phae.long3.wav")

checkwavs()

Run the code above in your browser using DataLab