When called with named arguments, sets the format.sas attribute on
the specified columns. When called without arguments, returns current formats.
Value
When setting: the data frame with updated format attributes. When getting: a named character vector of formats.
See also
Other metadata:
get_metadata(),
set_dataset_label(),
set_label(),
set_length()
Examples
df <- data.frame(ADT = as.Date("2024-01-01"), AVAL = 1.5)
df <- set_format(df, ADT = "DATE9.", AVAL = "8.1")
set_format(df)
#> ADT AVAL
#> "DATE9." "8.1"
