Learn R Programming

mtk (version 1.0)

mtkNativeDesigner-class: The mtkNativeDesigner class

Description

The mtkNativeDesigner class is a sub-class of the class mtkDesigner used to manage the sampling task implemented locally (i.e. tasks don't need to call services from the Web). By object inheriting, it provides all the slots and methods defined in the class mtkDesigner.

Arguments

Class Hierarchy

Parent classes :
mtkDesigner
Direct Known Subclasses :

Constructor

mtkNativeDesigner
signature(design=NULL, X=NULL, information=NULL)

Slots

design:
(ANY) a string, an R function, or NULL to inform the designer to use.
name:
(character) always takes the string "design".
protocol:
(character) a string to name the protocol used to run the process: http, system, R, etc. Here, it always takes "R".
site:
(character) a string to indicate where the service is located. Here, it gives no sense.
service:
(character) a string to name the service to invoke.
parameters:
(vector) a vector of [mtkParameter] containing the parameters to pass while calling the service.
ready:
(logical) a logical to tell if the process is ready to run.
state:
(logical) a logical to tell if the results produced by the process are available and ready to be consumed.
result:
(ANY) a data holder to hold the results produced by the process

Methods

setName
signature(this = "mtkNativeDesigner", name = "character"): Method inherited from the parent class. It gives no sense here.
setParameters
signature(this = "mtkNativeDesigner", f = "vector"): Assigns new parameters vector to the process.
getParameters
signature(this = "mtkNativeDesigner"): Returns the parameters vector as a named list.
is.ready
signature( = "mtkNativeDesigner"): Tests if the process is ready to run.
setReady
signature(this = "mtkNativeDesigner", switch = "logical"): Makes the process ready to run.
is.ready
signature( = "mtkNativeDesigner"): Tests if the results produced by the process are available.
setReady
signature(this = "mtkNativeDesigner", switch = "logical"): Marks the process as already executed.
getResult
signature(this = "mtkNativeDesigner"): Returns the results produced by the process as a [mtkDesignerResult].
getData
signature(this = "mtkNativeDesigner"): Returns the results produced by the process as a data.frame.
serializeOn
signature(this = "mtkNativeDesigner"): Returns all data managed by the process as a named list.
run
signature(this = "mtkNativeDesigner", context= "mtkExpWorkflow"): Generates the experimental design by sampling the factors.
summary
signature(object = "mtkNativeDesigner"): Provides a summary of the results produced by the process.
print
signature(x = "mtkNativeDesigner"): Prints a report of the results produced by the process.
plot
signature(x = "mtkNativeDesigner"): Produces a graphical report of the results produced by the process.
report
signature(this = "mtkNativeDesigner"): Reports the results produced by the process.

Details

We can construct an object of the mtkNativeDesigner class from the following situations:
  1. The designer is provided within the package "mtk";
  2. The designer is provided as an R function implemented outside the package "mtk"; If so, the R function must produce a result as a named list with two elements: X and information, where X is a date.frame containing the analysis result and information is a named list containing supplementary information about the analysis process.
  3. The experiments design is produced off-line and available as a data.frame. We just want to use the "mtk" package for reporting.
For detail uses, see examples from help(mtkNativeEvaluator).

References

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

Examples

Run this code
# Create a native designer with the method "Morris"
# implemented in the package "mtk"

designer <- mtkNativeDesigner(
	design ="Morris", 
	information=list(size=20)
	)

Run the code above in your browser using DataLab