Learn R Programming

warbleR (version 1.1.2)

wavdur: Measure the duration of sound files

Description

wavdur Measures the duration of sound files in '.wav' format

Usage

wavdur(files = NULL, path = NULL)

Arguments

files
Character vector with the names of the sound files to be measured. The sound files should be in the working directory or in the directory provided in 'path'.
path
Character string containing the directory path where the sound files are located. If NULL (default) then the current working directory is used.

Value

A data frame with the duration (in seconds) of the sound files.

Details

This function returns the duration (in seconds) of sound files.

Examples

Run this code
## Not run: 
# # First create empty folder
# setwd(tempdir())
# 
# 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")
# 
# wavdur()
# ## End(Not run)

Run the code above in your browser using DataLab