Learn R Programming

orderly (version 2.0.0)

orderly_plugin_add_metadata: Add metadata from plugin

Description

Add plugin-specific metadata to a running packet. This will take some describing. You accumulate any number of bits of metadata into arbitrary fields, and then later on serialise these to json.

Usage

orderly_plugin_add_metadata(name, field, data)

Value

Nothing, called only for its side effects

Arguments

name

The name of the plugin; must be the same as used in orderly_plugin_register() and orderly_plugin_context()

field

The name of a field to add the data to. This is required even if your plugin only produces one sort of data, in which case you can remove it later on within your serialisation function.

data

Arbitrary data to be added to the currently running packet

Examples

Run this code
# The example code from vignette("plugins") is available in the package
fs::dir_tree(system.file("examples/example.db", package = "orderly"))

# See orderly_plugin_add_metadata in context here:
orderly_example_show("R/plugin.R", example = "example.db")

Run the code above in your browser using DataLab