Normalize blank financial fields to zero, form-scoped
panel_normalize.RdInterprets blank core-990 financial cells as zero, respecting form scope and protecting non-filer rows:
both-form (
PZ) fields are zeroed for every filer;full-990-only (
PC) fields are zeroed only for non-990EZ filers (they are out of scope on the 990EZ and leftNA);rows with no financial data at all (a non-filer / shell record) are left untouched – no fabricated zeros.
Usage
panel_normalize(
data,
fields = c("core", "all"),
form = "RETURN_TYPE",
verbose = TRUE
)Arguments
- data
A data frame of 990 fields, or a panel.
- fields
"core"(default) or"all"(seefinancial_fields()).- form
Name of the return-type column. Default
"RETURN_TYPE".- verbose
Print a summary.
Value
data with in-scope blank financial fields set to zero; a
"normalize_audit" attribute records what was changed.
Details
By default only the curated core financial statements are touched; text,
dates, counts, and checkboxes are left to normalize(). Given a
panel the step is logged.