makeEnc {clamix} | R Documentation |
Prints out "equiprobabilistic" encodings (categorization) for numerical variables.
makeEnc(var, name, k, file="")
var |
variable values |
name |
name of variable |
k |
number of categories |
file |
file to write encoding into, default "" - to std. output |
The encoding is printed out and is to be used with encodeSO
function for encoding numerical variables into variables suitable for symObject
.
Vladimir Batagelj
encodeSO
, create.symData
, symObject
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 )