Skip to contents

Registers a spec made by gptr_spec() or one of the spec constructors at top level: rank 3, source "user", for the lifetime of the R process. Sessions frozen before the call are not changed; the next session sees the record. A user record overrides a built-in record of the same kind and name only (the built-in's other records keep working).

Usage

gptr_register(spec)

Arguments

spec

A spec (class gptr_spec).

Value

A function that removes the record again, invisibly.

Details

Called from model code while a run executes a tool, gptr_register() and the function it returns signal gptr_error_permission unless the user approved that call.

Examples

off = gptr_register(gptr_command("hello", function(args, ctx) "hi"))
off()