Description Usage Arguments Details Value Examples
ism_get_site_matrix()
takes in a matrix of historical data for a single
site and applies the Index Sequential Method (ISM) to it. Because this is
typically used to create future hydrology data, the entire matrix will have
a new start month (starMonth
).
1 2 3 | ism_get_site_matrix(xtsData, startMonth, nYrs = NA, monthly = TRUE)
createISMMatrix(xtsData, startMonth, nYrs = NA, monthly = TRUE)
|
xtsData |
An xts vector. |
startMonth |
The start month and year of the return matrix. Should be able to be cast to a zoo::yearmon. |
nYrs |
The number of years to create the data for. Defaults to the number of years in xtsData, but can be less. |
monthly |
Boolean that should be set to |
The method can be used on monthly or annual data. If you are applying it to
monthly data, then xtsData
needs to be monthly data, and monthly
should be set to TRUE
. If using annual data, then xtsData
should
be annual, i.e., all with a December timestamp, and monthly
should be
set to FALSE
. If monthly
is FALSE
and xtsData
is
monthly data, an error will occur.
xts matrix with the number of years/months specified by nYrs
and the number of columns equal to the number of years of data in xtsData
1 2 3 4 5 6 7 | # monthly data, that will create a 48x4 xts matrix
t1 <- xts::xts(1:48, zoo::as.yearmon("Jan 2000") + seq(0,47)/12)
ism_get_site_matrix(t1, "Jan 2020")
# annual data that will create a 5 x 6 matrix
t2 <- xts::xts(1:6, zoo::as.yearmon("Dec 2000") + 0:5)
ism_get_site_matrix(t2, "Dec 2020", nYrs = 5, monthly = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.