Learn R Programming

sonicscrewdriver (version 0.0.7)

subtractSpectra: Subtract two spectra from seewave

Description

This function takes two spectra from seewave (or equivalent) and subtracts their values. The spectra must have the same bins.

Usage

subtractSpectra(s1, s2, coerceNegative = TRUE)

Value

A spectrum of s1 - s2

Arguments

s1

First spectrum

s2

Second spectrum

coerceNegative

Sets any values below zero to zero in output.

Examples

Run this code
if (FALSE) {
subtractSpectra(spec1, spec2)
subtractSpectra(spec1, spec2, coerceNegative=TRUE)
}

Run the code above in your browser using DataLab