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
Post a Comment