Generate PBS dataset (Pharmaceutical Benefits Scheme Dispensings)
Source:R/generate_pbs.R
generate_pbs.RdConsolidated single-Rust-call entry point. All heavy work lives
inside generate_pbs_full__, which runs year-level par_iter
with streaming parquet writes per year. The R wrapper just loads
the item lookup and spine columns, then calls Rust once.
Usage
generate_pbs(
spine = NULL,
seed = 42L,
years = 2006L:2025L,
output_dir = NULL,
format = c("parquet", "csv"),
return_data = FALSE,
chunk_size = 100000L
)Arguments
- spine
Data.frame or NULL.
- seed
Integer.
- years
Integer vector of calendar years to generate.
- output_dir
Character or NULL.
- format
"parquet" only.
- return_data
Logical. If TRUE, read back from disk.
- chunk_size
Integer. Persons per streaming write batch. Default 100000. Peak memory per year is bounded by this.
Dataset and variable information
The PBS overview gives information about
this dataset. Use dataset_info("PBS") for dataset information. Use
variable_info("PBS") for variables, sources, value support, and topic tags.