Learn R Programming

mtk (version 1.0)

mtkDomain: The constructor of the class mtkDomain

Description

The constructor of the class mtkDomain.

Usage

mtkDomain(distributionName="unknown",domainNominalValue=0, distributionParameters=list())

Arguments

distributionName
a string corresponding to the distribution name associated with the domain.
domainNominalValue
an object of the mtkValue class or information allowing to create an object of the mtkValue class, used to hold the nominal value of the domain.
distributionParameters
a list to hold the parameters of the distribution associated with the domain.

Value

mtkDomain class

Examples

Run this code

# creates a  new domain with a continue distribution
	d <- mtkDomain(distributionName="unif", domainNominalValue=0, 
			distributionParameters = list(max=3, min=0))
	
# creates a  new domain with a discrete distribution
	d <- mtkDomain(distributionName="discrete", domainNominalValue=3, 
			distributionParameters = list(type='categorical',
		 	levels = c(1,2,3,4,5), weights=rep(0.2, 5)))
		

Run the code above in your browser using DataLab