check_clock_models: Check if the object is a list of one or more clock models.

Description Usage Arguments Value Author(s) See Also Examples

Description

Will stop if the object is not a list of one or more clock models.

Usage

1
check_clock_models(clock_models)

Arguments

clock_models

the object to be checked if it is a list of one or more valid clock models

Value

nothing. Will stop if the object is not a list of one or more clock models.

Author(s)

Richèl J.C. Bilderbeek

See Also

Use create_clock_model to create a valid clock model

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  testthat::expect_silent(check_clock_models(create_strict_clock_model()))
  testthat::expect_silent(
    check_clock_models(list(create_strict_clock_model()))
  )
  testthat::expect_silent(
    check_clock_models(
      list(create_strict_clock_model(), create_rln_clock_model())
    )
  )

  testthat::expect_error(check_clock_models("nonsense"))
  testthat::expect_error(check_clock_models(3.14))
  testthat::expect_error(check_clock_models(42))
  testthat::expect_error(check_clock_models(NA))
  testthat::expect_error(check_clock_models(NULL))

ropensci/beautier documentation built on May 14, 2019, 8:52 p.m.