knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) library(chevron) library(dplyr)
In addition of the embedded run()
method to create a tlg
, chevron offers a script-based approach that allows the
user to quickly edit a chevron workflow without the need for modifying a chevron_tlg
object.
The script is generated from script_funs
method which by default only output the script corresponding to the
preprocessing function in the generated script.
The object returned by the script
methods are vectors of character with one element per line of the script, that can be easily rendered.
res <- script_funs(aet01, adam_db = "syn_data", args = "args_list") writeLines(res)
The script generator depends on the functions actually stored in the object. Modifying the chevron_tlg
object can lead to a different script.
aet01_custom <- aet01 preprocess(aet01_custom) <- function(adam_db, new_format, ...) { reformat(adam_db, new_format) } res_funs <- script_funs(aet01_custom, adam_db = "syn_data", args = "args_list")
Print the generated scripts. Note that a new argument new_format
has been added and the pre processing function has been modified.
writeLines(res_funs)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.