makeEnc {clamix}R Documentation

Function for "equiprobabilistic" encoding of numerical variables

Description

Prints out "equiprobabilistic" encodings (categorization) for numerical variables.

Usage

makeEnc(var, name, k, file="")

Arguments

var

variable values

name

name of variable

k

number of categories

file

file to write encoding into, default "" - to std. output

Value

The encoding is printed out and is to be used with encodeSO function for encoding numerical variables into variables suitable for symObject.

Author(s)

Vladimir Batagelj

See Also

encodeSO, create.symData, symObject

Examples

set.seed(42)
makeEnc(runif(100),"Rand",10)
# result - a LIST ():
#encRand <- list(
#  "[0]" = function(x) x<=0,
#  "(0,0.08998052]" = function(x) x<=0.08998052,
#  "(0.08998052,0.2163854]" = function(x) x<=0.2163855,
#  "(0.2163854,0.3590283]" = function(x) x<=0.3590284,
#  "(0.3590283,0.4749971]" = function(x) x<=0.4749972,
#  "(0.4749971,0.6117786]" = function(x) x<=0.6117787,
#  "(0.6117786,0.6932048]" = function(x) x<=0.6932049,
#  "(0.6932048,0.7846928]" = function(x) x<=0.7846929,
#  "(0.7846928,0.914806]" = function(x) x<=0.9148061,
#  "(0.914806,0.9888917]" = function(x) x<=0.9888918,
#  "NA" = function(x) TRUE )

[Package clamix version 1.03 Index]