Skip to contents

Renders the decision tree using rpart.plot::rpart.plot().

Usage

# S3 method for class 'cjdiag_tree'
plot(x, ...)

Arguments

x

A cjdiag_tree object from cj_fit()

...

Additional arguments passed to rpart.plot::rpart.plot()

Value

Invisible NULL (called for side effect of plotting)

Examples

# \donttest{
df <- data.frame(
  y = sample(0:1, 200, TRUE),
  a = factor(sample(c("x","y"), 200, TRUE)),
  b = factor(sample(c("p","q","r"), 200, TRUE))
)
tr <- cj_fit(y ~ a + b, data = df, method = "tree")
plot(tr)

# }