visTree: visTree

Usage Arguments Examples

Usage

1
visTree(cond.tree, X, Y, range = NULL)

Arguments

cond.tree
X
Y
range

Examples

 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
##---- 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 (cond.tree, X, Y, range = NULL) 
{
    splittree <- list_node(cond.tree)
    structure <- strsplit(list_node(cond.tree), split = ";")
    if (length(unlist(structure)) == 1) {
        stop("Tree has only a single node; nothing to visualize.")
    }
    n.terminals <- ifelse(is.null(range), length(unlist(structure)), 
        length(range))
    if (is.null(range)) {
        index <- 1:n.terminals
    }
    else {
        index <- min(range):min(max(range), length(unlist(structure)))
    }
    par(mfrow = c(2, ceiling(length(index)/2)), mar = c(2, 1, 
        3, 1))
    sapply(unlist(structure)[index], function(S) {
        plot.minmax(minmax.mat(S, colnames(X)), X, Y)
    })
  }

jwolfson/visparty documentation built on May 20, 2019, 6:27 a.m.