Project, filter, and reshape an opennaijR dataset with manifest tracking
Source:R/apply_projection.R
apply_projection.Rdapply_projection() performs filtering and projection on an opennaijR_tbl,
allowing row filtering, column selection, renaming, and ordering.
It records a projection manifest for reproducibility.
Usage
apply_projection(
.data,
filter = NULL,
cols = NULL,
rename = NULL,
order = NULL,
reason = NULL
)Arguments
- .data
An
opennaijR_tblobject, typically returned bycbn().- filter
Optional filtering condition (unquoted expression).
- cols
Character vector or NULL. Columns to keep. All columns if NULL.
- rename
Named character vector or NULL. Rename spec: c(new = "old").
- order
Character vector or NULL. Optional final column order.
- reason
Optional description of why this projection is applied.