View source: R/knnst_helpers.R
knnst_index_years | R Documentation |
knn_st
objectsknnst_index_years()
gets all of the index years from all of the
disaggregation simulations.
knnst_index_years(disagg)
disagg |
A |
A matrix where each column is the index years selected for that
simulation, i.e., there are knnst_nsim()
columns.
flow_mat <- cbind(c(2000, 2001, 2002), c(1400, 1567, 1325))
# made up historical data to use as index years
ind_flow <- cbind(1901:1980, rnorm(80, mean = 1500, sd = 300))
# make up monthly flow for two sites
mon_flow <- cbind(
rnorm(80 * 12, mean = 20, sd = 5),
rnorm(80 * 12, mean = 120, sd = 45)
)
x <- knn_space_time_disagg(
flow_mat, ind_flow, mon_flow, start_month = 1, scale_sites = 1:2, nsim = 5
)
# will be a 3 x 5 matrix:
knnst_index_years(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.