tableau_invoke {plumbertableau} | R Documentation |
Programatically invoke a Tableau extension function
Description
Simulates invoking a Tableau extension function from a Tableau calculated
field SCRIPT_*
call. Intended for unit testing of plumbertableau extensions.
Usage
tableau_invoke(pr, script, ..., .toJSON_args = NULL, .quiet = FALSE)
Arguments
pr |
Either a tableau_extension style Plumber router object, or, the filename of a plumber.R that implements a Tableau extension. |
script |
The script string that identifies the plumber route to invoke.
(Equivalent to the first argument to |
... |
Zero or more unnamed arguments to be passed to the script. |
.toJSON_args |
Additional options that should be passed to
|
.quiet |
If |
Value
The object that was returned from the request, JSON-decoded using
jsonlite::parse_json
.
Examples
pr_path <- system.file("plumber/stringutils/plumber.R",
package = "plumbertableau")
tableau_invoke(pr_path, "/lowercase", LETTERS[1:5])