contains {processcheckR} | R Documentation |
Contains
Description
Check if the specified activity is present (contained) in a case.
The contains
rule examines whether the supplied activity
is present in a case or not.
The argument n
can be used to set a minimum number of occurences that should be present in each case.
Usage
contains(activity, n = 1)
Arguments
activity |
|
n |
|
See Also
Other Cardinality rules:
absent()
,
contains_between()
,
contains_exactly()
Examples
library(bupaR)
library(eventdataR)
# Each patient should be registered at least once.
patients %>%
check_rule(contains("Registration"))
# Check whether some patients have received 2 or more blood tests.
patients %>%
check_rule(contains("Blood test", n = 2))
[Package processcheckR version 0.1.4 Index]