is.fcat: Class test for a format catalog

Description Usage Arguments Value See Also Examples

View source: R/fcat.R

Description

This function tests whether an object is a format catalog. The format catalog has a class of "fcat".

Usage

1

Arguments

x

The object to test.

Value

TRUE or FALSE, depending on whether or not the object is a format catalog.

See Also

Other fcat: as.data.frame.fcat(), as.fcat.data.frame(), as.fcat.fmt_lst(), as.fcat.list(), as.fcat(), fcat(), print.fcat(), read.fcat(), write.fcat()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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)  
is.fcat(Sys.Date())          

fmtr documentation built on July 25, 2021, 9:06 a.m.