% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_e2tree_click.R
\name{plot_e2tree_click}
\alias{plot_e2tree_click}
\title{Interactive E2Tree Plot for R Graphics Device}
\usage{
plot_e2tree_click(
  fit,
  data,
  ensemble,
  main = "E2Tree - Click on nodes (ESC to exit)",
  ...
)
}
\arguments{
\item{fit}{An e2tree object}

\item{data}{The training data used to build the tree}

\item{ensemble}{The ensemble model (randomForest or ranger)}

\item{main}{Plot title (default: "E2Tree - Click on nodes (ESC to exit)")}

\item{...}{Additional arguments passed to rpart.plot}
}
\value{
Invisibly returns the rpart object
}
\description{
Displays an E2Tree as an interactive plot in the R graphics device.
Click on nodes to see detailed information in the console.
Right-click or press ESC to exit interactive mode.
}
\details{
This function converts the e2tree object to an rpart object and displays it
using rpart.plot. You can then click on any node to see:
\itemize{
\item Node ID and type (terminal/internal)
\item Number of observations
\item Prediction and probability/purity
\item Decision path to reach the node
\item Class distribution (for classification)
\item Split rule (for internal nodes)
\item Observations in the node (for terminal nodes)
}
}
\examples{
\donttest{
# After creating an e2tree object (requires interactive session)
if (interactive()) {
  plot_e2tree_click(tree, training, ensemble)
}
}

}
