Skip to contents

Returns the subsetting expression associated with a SplitValue (or ValueWrapper) object, or NULL for objects without one. This expression is used internally to subset data when tabulating.

Usage

value_expr(obj)

# S4 method for class 'ValueWrapper'
value_expr(obj)

# S4 method for class 'ANY'
value_expr(obj)

Arguments

obj

(ValueWrapper or ANY)
a split value object, typically a SplitValue constructed by SplitValue(). Any other object returns NULL.

Value

An expression object, or NULL.

Examples

sv <- SplitValue("A", sub_expr = expression(ARM == "A"))
value_expr(sv)
#> expression(ARM == "A")

value_expr("not a SplitValue") # NULL
#> NULL