get_private: Extract Private Fields of R6 Objects

View source: R/get_private.R

get_privateR 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

mlr3misc documentation built on June 25, 2024, 1:07 a.m.