test_objective {optimizeR}R Documentation

Test objective function

Description

This function is useful for testing or debugging the behavior of objective functions. It can throw a warning and / or an error on purpose.

Usage

test_objective(
  x,
  value = x,
  warning_prob = 0,
  error_prob = 0,
  warning_msg = "warning",
  error_msg = "error",
  call. = TRUE
)

Arguments

x

Any input.

value

The return value, any object.

warning_prob

The probability for throwing a warning.

error_prob

The probability for throwing an error.

warning_msg

The warning message.

error_msg

The error message.

call.

Passed to warning or stop, respectively.

Value

The argument value.


[Package optimizeR version 1.1.1 Index]