contains_exactly {processcheckR}R Documentation

Contains Exactly

Description

Check if the specified activity is present (contained) in a case for exactly n times.

The contains_exactly rule examines whether the supplied activity is present in a case for an exact number of n times.

Usage

contains_exactly(activity, n = 1)

Arguments

activity

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

n

numeric (default 1): The exact number of times the activity should be present. Should be greater than or equal to 1. Use absent instead to check for absent (i.e. n = 0) activities.

See Also

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

Examples

library(bupaR)
library(eventdataR)

# Each patient should have exactly one registration activity instance.
patients %>%
 check_rule(contains_exactly("Registration", n = 1))


[Package processcheckR version 0.1.4 Index]