Skip to contents

[Stable] Object that stores code to reproduce an object. It includes methods to get or run the code and return the object.

Super class

teal.data::Callable -> CallableCode

Methods

Inherited methods


Method new()

Create a new CallableCode object

Usage

CallableCode$new(code, env = new.env(parent = parent.env(globalenv())))

Arguments

code

(character)
a string containing R code to reproduce the desired object.

env

(environment)
environment where function will be evaluated

Returns

new CallableCode object


Method get_call()

Get sequence of calls from the code supplied to produce the object.

Usage

CallableCode$get_call(deparse = TRUE, args = NULL)

Arguments

deparse

(logical value)
whether to return a deparsed version of call

args

(NULL)
available to be consistent with CallableFunction but are not used to retrieve the call.

Returns

list of calls or character depending on deparse argument


Method clone()

The objects of this class are cloneable with this method.

Usage

CallableCode$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.