run_template: Run a template script

Description Usage Arguments Value See Also Examples

View source: R/scripts.R

Description

Run a template script

Usage

1
run_template(id, arguments, JSONValue = FALSE, ...)

Arguments

id

id of the template script.

arguments

list of arguments to the script.

JSONValue

bool (default FALSE) If true, returns the JSON values instead of the file_ids

...

additional arguments to scripts_post_custom

Value

If JSONValue is FALSE, File ids of any run outputs are returned. If JSONValue is TRUE, JSON values of first JSON run output is returned. If there are no JSON outputs, warning message is printed and nothing is returned If there are more than 1 JSON outputs, warning message is printed and the first JSON output is returned.

See Also

Other script_utils: civis_script(), fetch_output_file_ids(), run_civis()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Try a search for the template id
search_list('template name', type = 'template_script')

# Run the template
run_template(id, arguments = list(arg1 = 1, arg2 = 2), ...)

# Run the template and return JSON value outputs
run_template(id, arguments = list(arg1 = 1, arg2 = 2), JSONValue=TRUE, ...)

## End(Not run)

civisanalytics/civis-r documentation built on June 27, 2020, 7:25 a.m.