Skip to contents

The B use of a template SPEC: the items its parameters stand for, to save in a report's YAML (each item marked template:<name>) or to run.

Usage

tfl_template_expand(name, args = list(), codelists = NULL, population = NULL)

Arguments

name

The template's name ("demog").

args

Its parameters, a named list.

codelists

The report's code lists (as tfl_read_output() reads them), for the order and labels of values.

population

The study's analysis sets (data.yml's populations), for their labels; NULL for none.

Value

A list: ard, data, content (a list of tfl_item()).

See also

tfl_templates(); tpl_demog() and tpl_summary() for the objects (the A use).

Examples

x <- tfl_template_expand("demog", list(population = "SAF"))
vapply(x$content, function(it) it$fn, "")
#> [1] "table_plan"         "plan_cells"         "plan_labels"       
#> [4] "plan_paginate_rows"