get_private {mlr3misc}R Documentation

Extract Private Fields of R6 Objects

Description

Provides access to the private members of R6::R6Class objects.

Usage

get_private(x)

Arguments

x

(any)
Object to extract the private members from.

Value

environment() of private members, or NULL if x is not an R6 object.

Examples

library(R6)
item = R6Class("Item", private = list(x = 1))$new()
get_private(item)$x

[Package mlr3misc version 0.15.1 Index]