Description Usage Arguments Details Value Author(s) Examples
Group numerical vector and allow for group with zero values as well as formating
1 2 | classifyByQuantiles(x, n.main = 10, n.supp = 4, i.class.zero = FALSE,
format.level = FALSE, ordered.factor = FALSE)
|
x |
numieric vector |
n.main |
number of main groups |
n.supp |
number of supplement groups - total size of which equals sizt of one main group |
i.class.zero |
indicator for a separate group vor zero values |
format.level |
indicator for levels to be formatted |
ordered.factor |
to be given to cut() |
utility function for better grouping numerical valures
grouped factor vector
Roland Rapold
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | data(swiss)
summary(swiss$Agriculture)
x <- swiss$Agriculture
x[c(3, 6, 9, 22)] <- NA
n.main <- 6
n.supp <- 2
i.class.zero <- 1
i.class.zero <- 0
format.level <- TRUE
y <- classifyByQuantiles(x = x, n.main = n.main, n.supp = n.supp,
i.class.zero = i.class.zero,
format.level = format.level)
str(y)
levels(y)
table(y, useNA = "always")
sum(table(y, useNA = "always"))
format.level <- FALSE
y <- classifyByQuantiles(x = x, n.main = n.main, n.supp = n.supp,
i.class.zero = i.class.zero,
format.level = format.level)
str(y)
levels(y)
table(y, useNA = "always")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.