discretization in R with arules package -


i using arules package discretize continuous variables in data frame. using particular line

discretize(data1,categories = 3)

but giving me error

error in cut.default(x,k2) : k2 must numeric

i trying convert continuous variables "data1" data frame 3 bins discrete variables. appreciated...thanks in advance

this worked me :

data1.disc <- as.data.frame(lapply(data1,                                     function(x) discretize(x, categories=5)                                    )                            ) 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -