R/irtc_mml_constraint_check.R

Defines functions irtc_mml_constraint_check

# IRTC
# Copyright (C) 2026 WEIAN DATA TECH (Beijing) Co., Ltd.
# SPDX-License-Identifier: GPL-2.0-or-later
# See inst/COPYRIGHTS for licensing details.

## File Name: irtc_mml_constraint_check.R

irtc_mml_constraint_check <- function(constraint)
{
    if (constraint == "item") {
        constraint <- "items"
    }
    if (constraint == "case") {
        constraint <- "cases"
    }

    allowed <- c("items", "cases")
    if (!(constraint %in% allowed)) {
        choices <- paste(allowed, collapse="' or '")
        stop(paste0("Please choose one of the constraints: '", choices, "'\n"))
    }

    constraint
}

Try the IRTC package in your browser

Any scripts or data that you put into this service are public.

IRTC documentation built on July 24, 2026, 5:07 p.m.