load_experiment: Load an experiment from a GAML file

Description Usage Arguments Details Examples

View source: R/load_experiment.R

Description

Loads an experiment from a .gaml file and returns an object of class experiment.

Usage

1

Arguments

exp

The name of the experiment to load.

model

The name of the GAML file from which to load the experiment.

Details

The rama package contains an internal collection of GAMA models. These models are specified, at minima, by a .gaml. Additional files such as shapefile can be used to specify a model, in which case they are in the same directory as the .gaml file. The internal collection of GAMA models is in the examples directory of the rama package file hierarchy. These models can be accessed with the system.file function as explained in the example.
Before using the package rama, we advice the user to validate their model in Gama Platform.

Examples

1
2
3
4
5
6
7
# Listing the models available in the "examples" directory of the "rama" library:
grep(".gaml", dir(system.file("models", package = "rama")), value = TRUE)
# Loading experiment "sir" from the "sir.gaml" file:
exp1 <- load_experiment("sir",
                        system.file("models", "sir.gaml", package = "rama"))
# Checking the class:
class(exp1)

r-and-gama/rama documentation built on July 19, 2019, 9:49 p.m.