library(DynareR)
if (FALSE) {
demo(agtrend)
demo(bkk)
demo(example1)
# Provide the list of the `Dynare` files in a vector
# Ensure that "agtrend.mod", "bkk.mod" and "example1.mod"
# live in the current working directory
# Copy the dynare files to the current working directory
lapply(c("agtrend","bkk","example1"),\(x) file.copy(paste0(x,"/",x,".mod"),"."))
run_models(c("agtrend","bkk","example1")) # Run the models in the vector.
run_models() # Run all models in Current Working Directory.
# You can run all models that live in "DynareR/run_dynare/" folder
# Copy the dynare files to the 'DynareR/run_dynare' directory
lapply(c("agtrend","bkk","example1"),\(x) file.copy(paste0(x,".mod"),"DynareR/run_dynare"))
run_models("DynareR/run_dynare*") # Note the * at the end.
}
Run the code above in your browser using DataLab