absent: Absent

View source: R/absent.R

absentR Documentation

Absent

Description

Check if the specified activity is absent from a case.

The absent rule can be used to check whether an activity is absent in a case or not. The n parameter can be configured to create a different level of absence. When n = 0, an activity is not allowed to occur even a single time. The maximum number of times it is allowed to occur is n.

Usage

absent(activity, n = 0)

Arguments

activity

character: The activity to check. This should be an activity of the log supplied to check_rule.

n

numeric (default 0): The allowed number of occurences of the activity, e.g. n = 0 means the activity should be absent, n = 1 means it is allowed to occur once.

See Also

Other Cardinality rules: contains_between(), contains_exactly(), contains()

Examples

library(bupaR)
library(eventdataR)

# Check for which patients the activity "MRI SCAN" is absent.
patients %>%
 check_rule(absent("MRI SCAN"))

# Check for which patients the activity "Blood test" occurs maximum a single time,
# but not 2 times or more.
patients %>%
 check_rule(absent("Blood test", n = 1))


processcheckR documentation built on Oct. 3, 2022, 5:05 p.m.