1 | adjboxout(x)
|
x |
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 26 27 28 29 30 31 32 33 34 35 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x)
{
x = elimna(x)
n = length(x)
MC = mcskew(x)
val = idealf(x)
iqr = val$qu - val$ql
if (MC >= 0) {
bot = val$ql - 1.5 * exp(0 - 4 * MC) * iqr
top = val$qu + 1.5 * exp(3 * MC) * iqr
}
if (MC < 0) {
bot = val$ql - 1.5 * exp(0 - 3 * MC) * iqr
top = val$qu + 1.5 * exp(4 * MC) * iqr
}
flag = rep(F, length(x))
fl = (x < bot)
fu = (x > top)
flag[fl] = T
flag[fu] = T
vec <- c(1:n)
outid <- NULL
if (sum(flag) > 0)
outid <- vec[flag]
keep <- vec[!flag]
outval <- x[flag]
keep = x[!flag]
list(out.val = outval, out.id = outid, keep = keep, cl = bot,
cu = top)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.