acoustic_diversity: Acoustic Diversity Index

Description Usage Arguments Value Note References Examples

View source: R/acoustic_diversity.R

Description

Acoustic Diversity Index from Villanueva-Rivera et al. 2011. The ADI is calculated by dividing the spectrogram into bins (default 10) and taking the proportion of the signals in each bin above a threshold (default -50 dBFS). The ADI is the result of the Shannon index applied to these bins.

Usage

1
2
acoustic_diversity(soundfile, max_freq = 10000, db_threshold = -50, 
freq_step = 1000, shannon = TRUE)

Arguments

soundfile

an object of class Wave loaded with the function readWave of the tuneR package.

max_freq

maximum frequency to use when calculating the value, in Hertz.

db_threshold

threshold to use in the calculation.

freq_step

size of frequency bands.

shannon

TRUE to use the Shannon's diversity index to calculate the ADI (default).

Value

Returns a list with five objects per channel

adi_left

ADI value for the left channel

adi_right

ADI value for the right channel

left_band_values

vector of proportion values for each band for the left channel

right_band_values

vector of proportion values for each band for the right channel

left_bandrange_values

vector of frequency values for each band for the left channel

right_bandrange_values

vector of frequency values for each band for the right channel

Note

The code to calculate the ADI has changed due to an error we detected in the original scripts in which the value was calculated using a different equation. In a test of ~38k files, both ways to calculate were highly correlated. This version of the function uses the Shannon's Diversity Index. To obtain a result using the old calculation, set the argument shannon to FALSE. Please check the vignette "Changes in the Acoustic Diversity Index", included in the package, for more details.

For audio files with one channel, the results are showed as the left channel, the right channel returns NA.

References

Villanueva-Rivera, L. J., B. C. Pijanowski, J. Doucette, and B. Pekin. 2011. A primer of acoustic analysis for landscape ecologists. Landscape Ecology 26: 1233-1246. doi: 10.1007/s10980-011-9636-9.

Examples

1
2
3
4
5
6
7
	data(tropicalsound)
	result <- acoustic_diversity(tropicalsound)
	
	print(result$adi_left)
	
	summary(result)
	

soundecology documentation built on May 2, 2019, 3:21 a.m.