Skip to contents

Called by R code the agent runs (or by you inside a tool) to designate the run's result, which the session then returns as $value. Objects bound in the session's workspace are kept by name when large (no copy), copied when small; other values are boxed. Outside a run it returns its argument invisibly and does nothing else, so recorded code that still contains the call runs cleanly.

Usage

gptr_return(x)

Arguments

x

The value; a bare name is recorded by name.

Value

NULL invisibly during a run; x invisibly outside a run.

Examples

y = gptr_return(1:3)
#> gptr_return() only designates a value while an agent runs; here it returns its argument.
y
#> [1] 1 2 3