load_model {gEcon} | R Documentation |
.model.R
file
The load_model
function loads the already generated .model.R
file and creates an object of the gecon_model
class.
load_model(filename)
filename |
the path to the |
The .model.R
file with the model specification has to be created first. It can be done with the make_model
function taking a .gcn
file with model specification as an argument.
An object of the gecon_model
class representing the model. Generic functions such as print
and summary
allow to show the model's elements.
The make_model
function in order to create an .R file with the model specification.
# copy the example to the current working directory file.copy(from = file.path(system.file("examples", package = "gEcon"), "rbc.gcn"), to = getwd()) # make and load the model rbc <- make_model("rbc.gcn") print(rbc) # load the already generated model rbc2 <- load_model("rbc.model.R") print(rbc2)