knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

processcheckR

CRAN status R-CMD-check Codecov Lifecycle: stable

The goal of processcheckR is to support rule-based conformance checking. Currently the following declarative rules can be checked:

Cardinality rules:

Ordering rules:

Exclusiveness:

Rules can be checked using the check_rule and check_rules functions (see example below). It will create a new logical variable to indicate for which cases the rule holds. The name of the variable can be configured using the label argument in check_rule.

Installation

You can install processcheckR from CRAN with:

install.packages("processcheckR")

Development Version

You can also install the latest (stable) development version with bugfixes and new features directly from GitHub:

# install.packages("devtools")
devtools::install_github("bupaverse/processcheckR")

Example

library(bupaR)
library(processcheckR)
sepsis %>%
  # Check if cases starts with "ER Registration".
  check_rule(starts("ER Registration"), label = "r1") %>%
  # Check if activities "CRP" and "LacticAcid" occur together.
  check_rule(and("CRP","LacticAcid"), label = "r2") %>%
  group_by(r1, r2) %>%
  n_cases() 


bupaverse/processcheckR documentation built on Oct. 8, 2022, 2:23 a.m.