hasExpression: Check if parameter values contain expressions.

Description Usage Arguments Value Examples

View source: R/hasExpression.R

Description

Checks if a parameter, parameter set or list of parameters contain expressions.

Usage

1

Arguments

obj

(Param() | ParamHelpers::ParamSet() | list)
Parameter, parameter set or list of parameters.

Value

logical(1).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ps1 = makeParamSet(
  makeNumericParam("x", lower = 1, upper = 2),
  makeNumericParam("y", lower = 1, upper = 10)
)

ps2 = makeParamSet(
  makeNumericLearnerParam("x", lower = 1, upper = 2),
  makeNumericLearnerParam("y", lower = 1, upper = expression(p))
)

hasExpression(ps1)
hasExpression(ps2)

ParamHelpers documentation built on March 26, 2020, 7:40 p.m.