R/mypart.branch.R

myrpart.branch <- function (x, y, node, branch)
{
    is.left <- (node%%2L == 0L)
    node.left <- node[is.left]
    parent <- match(node.left/2L, node)
    sibling <- match(node.left + 1L, node)
    temp <- (x[sibling] - x[is.left]) * (1 - branch)/2
    xx <- rbind(x[is.left], x[is.left] + temp, x[sibling] - temp, 
        x[sibling], NA)
    yy <- rbind(y[is.left], y[parent], y[parent], y[sibling], 
        NA)
    list(x = xx, y = yy)
}

Try the StatMethRank package in your browser

Any scripts or data that you put into this service are public.

StatMethRank documentation built on Jan. 15, 2017, 8:59 p.m.