mtkLevels-class: The 'mtkLevels' class

Description Class Hierarchy Constructor Slots Methods Author(s) Examples

Description

The mtkLevels class is a class used to manage the weighting levels associated with a factor's domain.

Class Hierarchy

Parent classes :
Direct Known Subclasses :

Constructor

mtkLevesl

signature(type = "categorical", levels=vector(), weights=numeric(0))

Slots

type:

(character) a string to give the type of the discrete distribution such as 'categorical', 'qualitative', etc.

levels:

(vector) a vector to specify the levels.

weights:

(numeric) a numeric vector used to weight the levels.

Methods

getType

signature(this = "mtkLevels"): Returns the type of the discrete distribution such as 'categorical', 'qualitative', etc .

setType

signature(this = "mtkLevels", type="character"): Assigns a new type to the underlying object.

getLevels

signature(this = "mtkLevels"): Returns the vector of the levels.

setLevels

signature(this = "mtkLevels", levels = "vector"): Assigns a new vector to the levels.

getWeights

signature(this = "mtkLevels"): Returns the vector of the weights.

setWeights

signature(this = "mtkLevels", weights = "numeric"): Assigns new vector to the weight.

print

signature(x = "mtkLevel"): Prints a summarized report about the underlying object of the class mtkLevels.

summary

signature(object = "mtkLevel"): Gives a summary about the underlying object.

show

signature(object = "mtkLevel"): Displays informations about the underlying object.

Author(s)

Juhui WANG, MIA-jouy, INRA

Examples

1
2
3
4
5
6
7
# Create an object of the class 'mtkLevels'

	l <- mtkLevels(type='categorical', levels=seq(1:3), weight=rep(0.33, 3))

# Set the levels'name to ('a', 'b', 'c')
	
	setLevels(l, levels=c('a', 'b', 'c'))

mtk documentation built on May 2, 2019, 4:15 a.m.