Filters criteria by the person's age at the event date. Pass any comparison operator (lt, gt, gte, lte, eq, bt, nbt).

age(op)

Arguments

op

An opAttribute built with lt(), gt(), bt(), etc.

Value

An integer opAttribute with name = "Age" for use in any domain query.

See also

Examples

# Age 18 or older at index
conditionOccurrence(cs(1L, name = "test"), age(gte(18L)))
#> <Capr ConditionOccurrence Query> test 
# Age between 18 and 65
conditionOccurrence(cs(1L, name = "test"), age(bt(18L, 65L)))
#> <Capr ConditionOccurrence Query> test