Description Usage Arguments Value Examples
Compute the number of days separating LSAM and reference point for each year.
1 | getTimingLSAM(index.lsam, index.ref, years = NULL, for.year = NULL)
|
index.lsam |
A scalar/vector of index of LSAM values in given year/years |
index.ref |
A scalar/vector of index of reference point in given year/years |
years |
(optional) A vector of years corresponding to LSAM and ref values. This argument can be NULL if the LSAM and ref values are scalars. |
for.year |
(optional) Calculate timing (LSAM) only for the given year in this argument. If argument is omitted, timing (LSAM) values for all years are calculated. |
Scalar timing LSAM value if the inputs are scalars, or a Data frame containing two Columns:
year | First column, represents year |
timing.lsam | Second column, represents lsam timing values |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 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 signal parts
x.sp = getSignalParts(x.bl$pred2, candmin = c(40:125), candmax = c(190:330),
years = x.streamflow$data$year,
months = x.streamflow$data$month,
jdays = x.streamflow$data$jday)
# get LSAM values
lsam = getLSAM(x.bl$resid.sig, x.streamflow$data$year)
# timing LSAM
tlsam = getTimingLSAM(lsam$Index.all, x.sp$peak.index, x.sp$year)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.