Learn R Programming

admiral (version 1.2.0)

extend_condition: 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)

Value

A character string representing the extended condition.

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.

Examples

Run this code
# Extend an existing condition to include a check for 'AGE == "30"'
admiral:::extend_condition("SEX == 'M'", "AGE", "30")

Run the code above in your browser using DataLab