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

mlr-org/mlr3misc documentation built on April 28, 2024, 11 p.m.