Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is.format

Determine whether an object is a user-defined format


Description

The is.format function can be used to determine if an object is a user-defined format of class "fmt".

Usage

is.format(x)

Arguments

x

A user-defined format of class "fmt".

Details

The is.format function returns TRUE if the object passed is a user-defined format. User-defined formats are defined using the value function. See the value function help for further details.

Value

A logical value or TRUE or FALSE.

See Also

value to define a format, condition to define the conditions for a format, and fapply to apply the format to a vector.

Examples

# Define format
fmt1 <- value(condition(x == "A", "Label A"),
              condition(x == "B", "Label B"), 
              condition(TRUE, "Other"))
              
# Check for format
is.format(fmt1)
is.format("A")

fmtr

Easily Apply Formats to Data

v1.5.0
CC0
Authors
David Bosak
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.