search for: toexclud

Displaying 1 result from an estimated 1 matches for "toexclud".

Did you mean: toexclude
2012 Mar 20
1
overriding "summary.default" or "summary.data.frame". How?
...g2(1/N) normedEntropy <- function(x) entropy(x)/ maximumEntropy(length(x)) nas <- is.na(y) y <- factor(y) ll <- levels(y) tbl <- table(y) tt <- c(tbl) names(tt) <- dimnames(tbl)[[1L]] o <- sort.list(tt, decreasing = TRUE) if (length(ll) > numLevels){ toExclude <- numLevels:length(ll) tt <- c(tt[o[-toExclude]], `(All Others)` = sum(tt[o[toExclude]]), `NA's`=sum(nas)) }else{ tt <- c(tt[o], `NA's`=sum(nas)) } props <- prop.table(tbl); tt <- c(tt, "Entropy"=entropy(props), "NormedEntropy"= normedEnt...