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 (
1 2 3
An xts vector.
The start month and year of the return matrix. Should be able to be cast to a zoo::yearmon.
The number of years to create the data for. Defaults to the number of years in xtsData, but can be less.
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
should be set to
TRUE. If using annual data, then
be annual, i.e., all with a December timestamp, and
monthly should be
monthly data, an error will occur.
xts matrix with the number of years/months specified by
and the number of columns equal to the number of years of data in
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.