make_subset_expr: Make subset expression for a split-value pair

make_subset_exprR Documentation

Make subset expression for a split-value pair

Description

Make subset expression for a split-value pair

Usage

make_subset_expr(spl, val)

## S4 method for signature 'VarLevelSplit'
make_subset_expr(spl, val)

## S4 method for signature 'MultiVarSplit'
make_subset_expr(spl, val)

## S4 method for signature 'AnalyzeVarSplit'
make_subset_expr(spl, val)

## S4 method for signature 'AnalyzeColVarSplit'
make_subset_expr(spl, val)

## S4 method for signature 'VarStaticCutSplit'
make_subset_expr(spl, val)

## S4 method for signature 'CumulativeCutSplit'
make_subset_expr(spl, val)

## S4 method for signature 'AllSplit'
make_subset_expr(spl, val)

## S4 method for signature 'expression'
make_subset_expr(spl, val)

## S4 method for signature 'character'
make_subset_expr(spl, val)

Arguments

spl

(Split)
A split object.

val

⁠(SplitValue or string)⁠
The value, either as a SplitValue object or the raw value as a string.

Details

If val is a SplitValue object which already contains a subsetting expression with length ⁠>0⁠, that is immediately returned. Otherwise, the appropriate subsetting expression is constructed based on the split type of spl and the value val.

Value

A subseting expression to be used to restrict data to a particular column during tabulation.

Note

this is occasionally useful when constructing custom splitting behavior which may used for column splitting but generally should not be called directly by the end user.

Examples


spl <- VarLevelSplit("ARM", split_label = "ARM")
make_subset_expr(spl, "B: Placebo")

rtables documentation built on April 27, 2026, 9:09 a.m.