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 -

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

java - How can I send the data from a imput type="file" to the controller? -