Last data update: 2014.03.03

R: The 'mtkParsor' class
mtkParsor-classR Documentation

The mtkParsor class

Description

The mtkParsor class is the main class used to parse the XML files used in the "mtk" package. It provides a generic way to communicate with the plate-form of model simulation.

Class Hierarchy

Parent classes :
Direct Known Subclasses :

Constructor

mtkParsor

signature(xmlPath="")

Slots

xmlPath:

(character) the XML file's path and name.

Methods

setXMLFilePath

signature(this = "mtkParsor", xmlPath = "character"): Sets the xml File.

run

signature(this = "mtkParsor", context = "mtkExpWorkflow"): Parses the XML file and fills the workflow defined in the "context" argument with the data extracted from the XML file.

Author(s)

Juhui WANG, MIA-Jouy, Inra, Juhui.Wang@jouy.inra.fr

References

J. Wang, H. Richard, R. Faivre, H. Monod (2013). Le package mtk, une biblioth<c3><83><c2><a8>que R pour l'exploration num<c3><83><c2><a9>rique des mod<c3><83><c2><a8>les. In: Analyse de sensibilit<c3><83><c2><a9> et exploration de mod<c3><83><c2><a8>les : Application aux sciences de la nature et de l'environnement (R. Faivre, B. Iooss, S. Mah<c3><83><c2><a9>vas, D. Makowski, H. Monod, Eds). Editions Quae, Versailles.

Examples

# Create a parsor with the file "inst/extdata/WWDM.xml".

# Specify the XML file's name
	xmlFile <- "WWDM_morris.xml"

#  find where the examples are held.
#  This is only necessary for the example since the system does 
#  not know where the file "WWDM.xml" is kept.
	xmlFilePath <- paste(path.package("mtk", quiet = TRUE),
		"/extdata/",xmlFile,sep = "") 

## Create a parsor from the xml file
	parsor <- mtkParsor(xmlFilePath)

# Create an empty workflow.
	workflow <- mtkExpWorkflow()

# Parse the XML file and initialize the workflow 
# with the data extracted from the XML file.
	run(parsor, workflow) 

# Run the workflow and report the results of the sensitivity analysis

	run(workflow)
	summary(workflow)

Results