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

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -