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

javascript - Can Piwik report referrer in real time? -

asp.net - Google Drive Access: At least one client secrets (Installed or Web) should be set -

excel vba add hyperlink to shape in group -