knnst_nsim: Get the number of disaggregation simulations from 'knnst'...

View source: R/knnst_helpers.R

knnst_nsimR Documentation

Get the number of disaggregation simulations from knnst objects

Description

Get the number of disaggregation simulations from knnst objects

Usage

knnst_nsim(disagg)

Arguments

disagg

A knnst object

Value

The number of diaggregation simulations

Examples

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 return 5
knnst_nsim(x)


rabutler-usbr/knnstdisagg documentation built on Sept. 14, 2023, 2:47 p.m.