Skip to contents

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
#> [1] 1