getTransitionTime function

Transition Time

Transition Time

Compute the number of days separating HSAM and LSAM for the given year/years.

getTransitionTime(index.hsam, index.lsam, years, for.year = NULL)

Arguments

  • index.hsam: A scalar/vector of index of HSAM values in given year/years
  • index.lsam: A scalar/vector of index of LSAM values in given year/years
  • years: A vector of years corresponding to HSAM and LSAM values. This argument can be NULL if the HSAM and LSAM values are scalars.
  • for.year: (optional) Calculate transition time only for the given year in this argument. If argument is omitted, transition times for all years are calculated.

Returns

Scalar transition time if the inputs are scalars, or a Data frame containing two Columns:

yearFirst column, represents year
transition.timeSecond column, represents transition times

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) # get HSAM and LSAM values hsam = getHSAM(x.bl$resid.sig, x.streamflow$data$year) lsam = getLSAM(x.bl$resid.sig, x.streamflow$data$year) # transition time tt = getTransitionTime(hsam$Index.all, lsam$Index.all, hsam$year)
  • Maintainer: Samarth Shah
  • License: GPL-3
  • Last published: 2019-03-08

Useful links