slimr_script_render: Render a SLiM script with special slimrlang formatting

Description Usage Arguments

View source: R/slimr_scripting.R

Description

If your slimr_script object has made use of special slimrlang syntax such as slimr_template, slimr_input, or slimr_output, this function will 'render' the slimr_script into valid SLiM syntax, ready to be run with SLiM or slim_run_script

Usage

1
slimr_script_render(slimr_script, template = NULL, replace_NAs = FALSE)

Arguments

slimr_script

The slimr_script object to be rendered

template

A list or data.frame containing values for any templated variables. If a list, it must be named, where the names correspond to the variables. If a list of lists, the internal lists must be names with the variable names, and slimr_script_render will render a separate slimr_script for each top-level lsit element and return it as a slimr_script_coll object. If a data.frame (or tibble), then the column names should match the templated variables, and slimr_script_render will render a separate slim_script for each row and return it as a slimr_script_coll object.

replace_NAs

Should NA values in the template be replaced by their default values?


rdinnager/slimrlang documentation built on June 20, 2020, 8:17 p.m.