R: Get terminal node IDs (deprecated)

getTerminalNodeIDs {ranger} | R Documentation

## Get terminal node IDs (deprecated)

### Description

This function is deprecated. Please use predict() with `type = "terminalNodes"` instead. This function calls predict() now.

### Usage

    getTerminalNodeIDs(rf, dat)

### Arguments

`rf` | `ranger` object.
`dat` | New dataset. Terminal node IDs for this dataset are obtained.

### Value

Matrix with terminal nodeIDs for all observations in dataset and trees.

### Examples

    library(ranger)
    rf <- ranger(Species ~ ., data = iris, num.trees = 5, write.forest = TRUE)
    getTerminalNodeIDs(rf, iris)

[Package ranger version 0.7.0 Index]