Learn R Programming

rtables (version 0.6.17)

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

# S4 method for ANY value_expr(obj)

Value

An expression object, or NULL.

Arguments

obj

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

Examples

Run this code
sv <- SplitValue("A", sub_expr = expression(ARM == "A"))
value_expr(sv)

value_expr("not a SplitValue") # NULL

Run the code above in your browser using DataLab