Builds a comparison operator for use inside attribute functions such as age, valueAsNumber, startDate, etc. Accepts integer, numeric, Date, or character inputs.

eq(x)

# S4 method for integer
eq(x)

# S4 method for numeric
eq(x)

# S4 method for Date
eq(x)

# S4 method for character
eq(x)

Arguments

x

Comparison value (integer, numeric, Date, or character).

Value

An opAttribute for use inside attribute constructor functions.

See also

lt, gt, lte, gte, bt

Examples

# Exactly 2 refills
drugExposure(cs(1L, name = "drug"), drugRefills(eq(2L)))
#> <Capr DrugExposure Query> drug