Set the type of a column in metadata
Arguments
- meta
An
rsdv_metadataobject.- column
Column name (character).
- type
One of
"numerical","categorical","boolean","datetime","id".For categorical columns the level order used by the synthesizer follows the input: a
factorkeeps itslevels()order (including ordered factors), while a plain character column gets a sorted unique-value order for determinism. The sort is lexicographic, so numeric-like character columns (c("2", "10")) come back ordered"10", "2". Coerce these tofactorwith the desired level order before fitting if order matters.
Examples
metadata() |> set_column_type("age", "numerical")
#> rsdv Metadata
#> Columns: 1
#> age [numerical]