Learn R Programming

mtk (version 1.0)

setDomain-methods: The setDomain method

Description

Associates a new domain with the factor.

Usage

setDomain(this, domain)

Arguments

this
an object of the class mtkFactor .
domain
an object of the class mtkDomain .

Value

Examples

Run this code
# Define a factor
	x1 <- make.mtkFactor(name="x1")

# Define a domain
	d <- mtkDomain(distributionName="unif", 
		 domainNominalValue=0, distributionParameters = list(max=3, min=0))
	
# Use the setDomain to change the domain of the factor
	setDomain(x1,d)

Run the code above in your browser using DataLab