1 | zdepth.sub(x, theta, zloc = median, zscale = mad, pts = NA)
|
x |
|
theta |
|
zloc |
|
zscale |
|
pts |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ##---- 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, theta, zloc = median, zscale = mad, pts = NA)
{
theta <- theta/sqrt(sum(theta^2))
temp <- t(t(x) * theta)
ppro <- sum(t(t(pts) * theta))
yhat <- apply(temp, 1, sum)
val <- 0 - abs(ppro - zloc(yhat))/zscale(yhat)
val
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.