getLSAM: Low Spectral Anomaly Mangitude (LSAM)

Description Usage Arguments Value Examples

Description

Compute Low Spectral Anomaly Magnitude (LSAM) from the given residual values each year

Usage

1
getLSAM(resid, years, for.year = NULL)

Arguments

resid

A vector of residual values generated with respect to the baseline signal

years

A vector of years corrosponding to the residual values

for.year

(optional) Calculate LSAM values only for the given year in this argument. If argument is omitted, LSAM values for all years are calculated.

Value

Data frame containing four columns:

year First column, represents year
LSAM Second column, represents LSAM values
index.year Third column, representing index of LSAM value in that year
index.all Fourth column, representing index of LSAM value in the input resid

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# load sample data
data("sycamore")
x = sycamore

# get streamflow object for the sample data
x.streamflow = asStreamflow(x)

# prepare baseline signal 
x.bl = prepareBaseline(x.streamflow)

# LSAM
lsam = getLSAM(x.bl$resid.sig, x.streamflow$data$year)

discharge documentation built on May 2, 2019, 5:54 a.m.

Related to getLSAM in discharge...