check_required_models: Check if an argument x has all the required models

Description Usage Arguments Value

View source: R/checkmate.R

Description

Check if an argument x has all the required models

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
check_required_models(x, names, check_supported_model = TRUE)

assert_required_models(
  x,
  names,
  check_supported_model = TRUE,
  .var.name = checkmate::vname(x),
  add = NULL
)

test_required_models(x, names, check_supported_model = TRUE)

expect_required_models(
  x,
  names,
  check_supported_model = TRUE,
  info = NULL,
  label = vname(x)
)

Arguments

x

a named list.

names

a character vector contains names of the required models

check_supported_model

Whether to check that each element in x are supported by Trans using assert_transition_supported_model().

.var.name

[character(1)]
The custom name for x as passed to any assert* function. Defaults to a heuristic name lookup.

add

checkmate::AssertCollection
Collection to store assertions. See checkmate::AssertCollection.

info

[character(1)]
See expect_that

label

[character(1)]
See expect_that

Value

TRUE if all the required models exist else throws an error.


dymium-org/dymiumCore documentation built on July 18, 2021, 5:10 p.m.