https://github.com/cran/FSelector
Revision d2854b77f74f8ee2cb0f4916e5d5a940f035fc6e authored by Lars Kotthoff on 07 January 2021, 17:10:26 UTC, committed by cran-robot on 07 January 2021, 17:10:26 UTC
1 parent 12acd76
Tip revision: d2854b77f74f8ee2cb0f4916e5d5a940f035fc6e authored by Lars Kotthoff on 07 January 2021, 17:10:26 UTC
version 0.32
version 0.32
Tip revision: d2854b7
misc.R
as.simple.formula <- function(attributes, class) {
return(as.formula(paste(class, paste(attributes, sep = "", collapse = " + "), sep = " ~ ")))
}
get.data.frame.from.formula <- function(formula, data) {
d = model.frame(formula, data, na.action = NULL)
for(i in 1:dim(d)[2]) {
if(is.factor(d[[i]]) || is.logical(d[[i]]) || is.character(d[[i]]))
d[[i]] = factor(d[[i]])
}
return(d)
}
entropyHelper <- function(x, unit = "log") {
return(entropy(table(x, useNA="always"), unit = unit))
}
Computing file changes ...