Description Usage Arguments Details Value Examples
View source: R/class_model_shock.R
The get_shock_names_by_index
function allows to retrieve the names of shocks with given indices.
1 | get_shock_names_by_index(model, index_names)
|
model |
an object of |
index_names |
a character vector of indices. |
Cf. gEcon users' guide, chapter ‘Templates’.
The function returns a character vector of relevant shocks' names.
1 2 3 4 5 6 7 8 9 10 11 12 | # copy the example to the current working directory
file.copy(from = file.path(system.file("examples", package = "gEcon"),
"home_production_templ.gcn"), to = getwd())
# make and load the model
home_prod_templ <- make_model("home_production_templ.gcn")
# get shocks affecting home production technology
hp_shocks <- get_shock_names_by_index(home_prod_templ, "H")
# print information about selected shocks
shock_info(home_prod_templ, hp_shocks)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.