% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree.R
\name{generate_tree_node}
\alias{generate_tree_node}
\title{Construct a single node of a tree}
\usage{
generate_tree_node(node, calc_mode = "")
}
\arguments{
\item{node}{a list with named elements \code{path} and \code{prediction}. See details
for more.}

\item{calc_mode}{character, takes values \code{""} and \code{"calc_mode"}.

The \code{node} list should contain the two lists \code{path} and \code{prediction}.

The \code{path} element has the following structure:

This list can contain 0 or more elemements. The elements but each be of the
following format:
\itemize{
\item \code{type} character, must be \code{"conditional"}, \code{"set"}, or \code{"all"}.
\item \code{op} character.
if \code{type == "conditional"} must be \code{"more"}, \code{"more-equal"}, \code{"less"}, or
\code{"less-equal"}.
if \code{type == "set"} must be \code{"in"} on \verb{not-in}.
\item \code{col} character.
\item \code{val} if \code{type == "conditional"} and \code{vals} if \code{type == "set"}.
Can be character or numeric.
}

The \code{prediction} list has the following structure:

It can either be a singular value or a list.
If it is a list it will have the following 4 named elements \code{col}, \code{val},
\code{op}, and \code{is_intercept}.
\itemize{
\item \code{col} character, name of column
\item \code{val} val, numeric of character
\item \code{op} character, known values are \code{"none"} and \code{"multiply"}. \code{"none"} is
used then \code{is_intercept == 1}.
\item \code{is_intercept}integer, takes values \code{0} and \code{1}.`
}

@keywords internal}
}
\description{
Construct a single node of a tree
}
