value_expr: Retrieve the subset expression from a split value

value_exprR Documentation

Retrieve the subset expression from a split value

Description

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 signature 'ValueWrapper'
value_expr(obj)

## S4 method for signature '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)

value_expr("not a SplitValue") # NULL


rtables documentation built on Oct. 1, 2026, 9:07 a.m.

Related to value_expr in rtables...