Save an object of class experiment
to an XML file GAMA-compliant.
save_to_gama(exp, filename = NULL, path = NULL) # S3 method for default save_to_gama(exp, filename, path) # S3 method for experiment save_to_gama(exp, filename = NULL, path = NULL)
exp | An object of class |
---|---|
filename | name of XML parameter file. If not specified, name of `exp`` is used. |
path | Path to save `filename`. If not specified, current working directory is used. |
gaml_file <- system.file("models", "sir.gaml", package = "rama") exp1 <- load_experiment("sir", gaml_file)#> Loading experiment "sir" from file "sir.gaml"...#>#> Periods of observation ("obsrates") are converted into integers.#>#> Final time step ("tmax") is converted into integer.#>#> Seed is converted into numeric.#>#> Parameters' types are cast according to model definition#>save_to_gama(exp1)#> [1] "/Users/mac/Desktop/rama/docs/reference/sir.xml"