Learn R Programming

mtk (version 1.0)

setWeights-methods: The setWeights method

Description

Gives new weights to the discrete distribution associated with the factor's domain.

Usage

setWeights(this, weights)

Arguments

this
the underlying object of the class to proceed (mtkLevels).
weights
a vector of numeric value.

Value

Examples

Run this code

# Create a mtkLevels object

	l <- mtkLevels(type='categorical', levels=c(1,2,3,4))

	setWeights(l, weights=rep(0.25,4))

Run the code above in your browser using DataLab