Description Usage Arguments See Also Examples
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 = 1, an activity is not allowed to occur even a single time. The maximum number of times it is allowed to occur is 'n-1'.
1 | absent(activity, n = 1)
|
activity |
The activity to check. Character vector of length one. |
n |
n-1 is the allowed number of occurences of the activity. E.g. n = 1 means the activity should be absent, n = 2 means it is allowed to occur once. |
Other Declarative Rules: and
,
contains_between
,
contains_exactly
, contains
,
ends
, precedence
,
responded_existence
,
response
, starts
,
succession
, xor
1 2 3 4 5 6 7 8 9 10 11 | 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 = 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.