Learn R Programming

mtk (version 1.0)

mtkLevels: The constructor of the class mtkLevels

Description

The constructor of the class mtkLevels.

Usage

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

Arguments

type
a string to specify the type of the discrete distribution: categorical, qualitative, etc.
levels
a vector of levels for a discrete domain.
weights
a vector of numeric values used to weight the levels.

Value

mtkLevels class

Examples

Run this code
# creates an object of the class mtkLevel
l1 <- mtkLevels(type="qualitative",levels = c("x", "y"), weights=c(0.5, 0.5))
l2 <- mtkLevels(levels = c("a", "b", "c"))
l3 <- mtkLevels(levels = c("a", "b", "c"), weights=c(3, 5, 3))

Run the code above in your browser using DataLab