| node1 | R Documentation |
Dichotomize via 1st Node of Recursive Partitioning
node1(object, nm = as.symbol(rownames(s)[1L]), ...)
object |
an rpart.object |
nm |
symbol, or name, of the variable being partitioned |
... |
additional parameters, currently not in use |
The function node1() returns an object of class 'node1',
which is a function
with one parameter newx taking a double vector.
In future integer and factor predictors will be supported.
https://tingtingzhan.quarto.pub/groupedhyperframe/object/node1.html
rpart::rpart(
formula = survival::Surv(pgtime, pgstat) ~ age,
data = rpart::stagec[1:135,],
cp = .Machine$double.eps, maxdepth = 2L
) |>
node1()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.