build.tree: Tree Graphic Function

Description Usage Arguments Examples

View source: R/myPackage.R

Description

Builds MPS graphic in graphics window

Usage

1
2
3
4
5
6
7
8
build.tree(
  var.mat.na,
  cex = 0.9,
  alt = 1,
  shape1 = "trad",
  shape2 = "right",
  col
)

Arguments

var.mat.na

matrix of MPS data

cex

text size

alt

integer that vertically staggers terminal nodes (max of 3)

shape1

either 'trad' or 'rad' for traditional trees and radial trees

shape2

either 'right' or 'tri' for rectangular and triangular; only matters for shape1='trad'

col

node color

Examples

1
2
3
4
5
6
7
8
mat_input<-c('Var1','Var1','Var1','Var1','Var2','Var2',
   'Var3','Var3','Var4','Var5','Var4','Var5')
mat1<-matrix(mat_input,nrow=4)
build.tree(mat1) #base example
build.tree(mat1,alt=2) #different alt
build.tree(mat1,shape1="rad") #radial tree
build.tree(mat1,shape2="tri") #triangular tree (only for shape1)
build.tree(mat1,col="red") #node color

nkissel/ModelPath documentation built on Feb. 13, 2021, 12:53 a.m.