subtractSpectra: Subtract two spectra from seewave

Description Usage Arguments Value Examples

View source: R/spectraMaths.R

Description

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

Usage

1
subtractSpectra(s1, s2, coerceNegative = "no")

Arguments

s1

First spectrum

s2

Second spectrum

coerceNegative

Sets any values below zero to zero, accepted values "input", "output" or "both".

Value

A spectrum of s1 - s2

Examples

1
2
3
4
5
## Not run: 
subtractSpectra(spec1, spec2)
subtractSpectra(spec1, spec2, coerceNegative="both")

## End(Not run)

sonicscrewdriver documentation built on May 2, 2021, 5:06 p.m.