getHSAM function

High Spectral Anomaly Mangitude (HSAM)

High Spectral Anomaly Mangitude (HSAM)

Compute High Spectral Anomaly Magnitude (HSAM) from the given residual values each year

getHSAM(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 HSAM values only for the given year in this argument. If argument is omitted, HSAM values for all years are calculated.

Returns

Data frame containing four columns:

yearFirst column, represents year
HSAMSecond column, represents HSAM values
index.yearThird column, representing index of HSAM value in that year
index.allFourth column, representing index of HSAM value in the input resid

Examples

# 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) # HSAM hsam = getHSAM(x.bl$resid.sig, x.streamflow$data$year)
  • Maintainer: Samarth Shah
  • License: GPL-3
  • Last published: 2019-03-08

Useful links