check_arguments: Check that tidying methods use allowed argument names

View source: R/check_arguments.R

check_argumentsR Documentation

Check that tidying methods use allowed argument names

Description

Call this function to perform tests. If a tests fails, an informative error will be thrown. Otherwise silent.

Tests when strict = FALSE:

  • None

Tests when strict = TRUE:

  • tidy_method has a conf.int argument if it has a conf.level argument.

  • tidy_method has a conf.level argument if it has a conf.int argument.

  • conf.int defaults to FALSE when present.

  • conf.level defaults to '0.95“ when present.

  • exponentiate defaults to FALSE when present.

  • All arguments to tidy_method are listed in the argument_glossary.

Usage

check_arguments(tidy_method, strict = TRUE)

Arguments

tidy_method

A tidying method. For example: glance.Arima.

strict

Logical indicating whether the strict version of tests should be used. Defaults to TRUE.

Value

An invisible NULL. This function should be called for side effects, not return values.

See Also

testthat, testthat::expect_true()


alexpghayes/modeltests documentation built on March 7, 2024, 11 p.m.