Skip to contents

Generate Sample Description

Usage

boilerplate_report_sample(
  n_total,
  appendices_sample = "B-D",
  custom_template = NULL,
  replacements = list(),
  baseline_wave,
  exposure_wave,
  outcome_wave
)

Arguments

n_total

Numeric value indicating the total number of participants.

appendices_sample

Character string specifying the appendices containing sample data.

custom_template

Character string containing a custom template for the sample description. Use placeholders like n_total and appendices_sample for variable insertion.

replacements

Named list of additional custom replacements for the template.

Value

A character string containing the sample description in markdown format.

Examples

# Using default template
boilerplate_report_sample(n_total = 47000, appendices_sample = "A-C")
#> Error in boilerplate_report_sample(n_total = 47000, appendices_sample = "A-C"): argument "baseline_wave" is missing, with no default

# Using custom template
custom_template <- "
### Study Sample
This study used data from {{n_total}} participants in the NZAVS.
Appendices {{appendices_sample}} contain detailed data summaries.
{{custom_info}}
"
boilerplate_report_sample(
  n_total = 47000,
  appendices_sample = "A-C",
  custom_template = custom_template,
  replacements = list(custom_info = "Additional custom information here.")
)
#> Error in boilerplate_report_sample(n_total = 47000, appendices_sample = "A-C",     custom_template = custom_template, replacements = list(custom_info = "Additional custom information here.")): argument "baseline_wave" is missing, with no default