% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/accessors.R
\name{nodes}
\alias{nodes}
\alias{nodes.e2tree}
\title{Extract Tree Node Information}
\usage{
nodes(x, ...)

\method{nodes}{e2tree}(x, terminal = FALSE, ...)
}
\arguments{
\item{x}{An e2tree object.}

\item{...}{Additional arguments (ignored).}

\item{terminal}{Logical. If \code{TRUE}, return only terminal (leaf) nodes.
Default is \code{FALSE}.}
}
\value{
A data frame with one row per node.
}
\description{
Extracts the data frame describing the nodes of an E2Tree model,
including split rules, predictions, and node statistics.
}
\examples{
\donttest{
data(iris)
smp_size <- floor(0.75 * nrow(iris))
train_ind <- sample(seq_len(nrow(iris)), size = smp_size)
training <- iris[train_ind, ]

ensemble <- randomForest::randomForest(Species ~ ., data = training,
  importance = TRUE, proximity = TRUE)
D <- createDisMatrix(ensemble, data = training, label = "Species",
  parallel = list(active = FALSE, no_cores = 1))
setting <- list(impTotal = 0.1, maxDec = 0.01, n = 2, level = 5)
tree <- e2tree(Species ~ ., training, D, ensemble, setting)

nodes(tree)
nodes(tree, terminal = TRUE)
}

}
