Question

I discretize a dataset using RWeka in R.

library(RWeka)
m2 <- Discretize(Species ~., data = iris)
View(m2)

But I want the output as an integer matrix.

For example: all the outputs of the package Discretization in R are integer matrix.

Was it helpful?

Solution

I suppose you're looking for as.integer:

data.frame(lapply(m2, as.integer))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top