powered by
Dichotomize via 1st Node of Recursive Partitioning
node1(object, nm = as.symbol(rownames(s)[1L]), ...)
The function node1() returns an object of class 'node1', which is a function
node1()
'node1'
with one parameter newx taking a double
newx
vector.
an rpart.object
symbol, or name, of the variable being partitioned
additional parameters, currently not in use
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()
Run the code above in your browser using DataLab