R/convertNodeId.R

convertNodeId <- function(id)
{
    id = as.numeric(id)
    tmp = id
    ans = 1
    while (tmp > 0.001)
    {
        tmp = tmp * 10
        LR = round(tmp)
        ans = ans * 2 + LR - 1
        tmp = tmp - LR
    }
    return(ans)
}

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.