Learn R Programming

maxEff (version 0.2.3)

node1: Dichotomize via 1st Node of Recursive Partitioning

Description

Dichotomize via 1st Node of Recursive Partitioning

Usage

node1(object, nm = as.symbol(rownames(s)[1L]), ...)

Value

The function node1() returns an object of class 'node1', which is a function

with one parameter newx taking a double

vector.

Arguments

object

an rpart.object

nm

symbol, or name, of the variable being partitioned

...

additional parameters, currently not in use

References

https://tingtingzhan.quarto.pub/groupedhyperframe/object/node1.html

Examples

Run this code
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