extend_condition {admiral} | R Documentation |
Extend a condition string by adding a new condition based on a variable and its value
Description
This internal helper function extends a condition string by appending a new condition that checks if a variable equals a specific value.
Usage
extend_condition(cond, var, is)
Arguments
cond |
A character string representing an existing condition.
|
var |
A character string representing the name of the variable to check.
|
is |
A character string representing the value the variable should be equal to.
|
Value
A character string representing the extended condition.
Examples
# Extend an existing condition to include a check for 'AGE == "30"'
admiral:::extend_condition("SEX == 'M'", "AGE", "30")
[Package admiral version 1.3.0 Index]