# Create format catalog
c1 <- fcat(num_fmt = "%.1f",
label_fmt = value(condition(x == "A", "Label A"),
condition(x == "B", "Label B"),
condition(TRUE, "Other")),
date_fmt = "%d%b%Y")
# Test for "fcat" class
is.fcat(c1)
# [1] TRUE
is.fcat(Sys.Date())
# [1] FALSE
Run the code above in your browser using DataLab