Skip to contents

Create Script for TLG Generation

Usage

script_funs(x, adam_db, args, name = deparse(substitute(x)))

# S4 method for chevron_tlg
script_funs(x, adam_db, args, name = deparse(substitute(x)))

# S4 method for chevron_simple
script_funs(x, adam_db, args, name = deparse(substitute(x)))

Arguments

x

(chevron_tlg) input.

adam_db

(string) the name of the dataset.

args

(string) the name of argument list.

name

(string) name of the template.

Value

character that can be integrated into an executable script.

Examples

script_funs(aet04, adam_db = "syn_data", args = "args")
#>  [1] "# Edit Preprocessing Function."                                                         
#>  [2] "preprocess(aet04) <- "                                                                  
#>  [3] "function(adam_db, ...) {"                                                               
#>  [4] "  atoxgr_lvls <- c(\"1\", \"2\", \"3\", \"4\", \"5\")"                                  
#>  [5] "  adam_db$adae <- adam_db$adae %>%"                                                     
#>  [6] "    filter(.data$ANL01FL == \"Y\") %>%"                                                 
#>  [7] "    mutate("                                                                            
#>  [8] "      AEBODSYS = reformat(.data$AEBODSYS, nocoding),"                                   
#>  [9] "      AEDECOD = reformat(.data$AEDECOD, nocoding),"                                     
#> [10] "      ATOXGR = factor(.data$ATOXGR, levels = atoxgr_lvls)"                              
#> [11] "    )"                                                                                  
#> [12] "  adam_db"                                                                              
#> [13] "}"                                                                                      
#> [14] ""                                                                                       
#> [15] "# Create TLG"                                                                           
#> [16] "tlg_output <- run(object = aet04, adam_db = syn_data, verbose = TRUE, user_args = args)"