node.match {cubt}R Documentation

node.match

Usage

node.match(nodes, nodelist, leaves, print.it = TRUE)

Arguments

nodes
nodelist
leaves
print.it

Examples

##---- 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 (nodes, nodelist, leaves, print.it = TRUE) 
{
    node.index <- match(nodes, nodelist, nomatch = 0L)
    bad <- nodes[node.index == 0L]
    if (length(bad) > 0L & print.it) 
        warning("supplied nodes ", paste(bad, collapse = ","), 
            " are not in this tree")
    good <- nodes[node.index > 0L]
    if (!missing(leaves) && any(leaves <- leaves[node.index])) {
        warning("supplied nodes ", paste(good[leaves], collapse = ","), 
            " are leaves")
        node.index[node.index > 0L][!leaves]
    }
    else node.index[node.index > 0L]
  }

[Package cubt version 3.2 Index]