Discretization data numeric and convert to a integer matrix?
-
21-12-2019 - |
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.
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