| hal_register_tool_specs | R Documentation |
Registers a list of tool specifications (as returned by e.g.
winston::timelog_tool_specs()) on the active session.
hal_register_tool_specs(specs)
specs |
A list of tool spec lists. |
Each spec must be a list with at minimum name, description, and
handler (a function). Optional: parameters (JSON Schema).
Invisibly returns the number of tools registered.
## Not run:
specs <- list(
list(
name = "row_count",
description = "Count the rows of a data frame in the global environment",
handler = function(name) nrow(get(name, envir = globalenv()))
)
)
hal_register_tool_specs(specs)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.