is.param.valid: Validate parameter values

Description Usage Arguments Value Examples

View source: R/params.R

Description

Validate parameter values

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
is.param.valid(param, value)

## Default S3 method:
is.param.valid(param, value)

## S3 method for class 'param.discrete'
is.param.valid(param, value)

## S3 method for class 'param.real'
is.param.valid(param, value)

## S3 method for class 'param.distributed'
is.param.valid(param, value)

## S3 method for class 'param.distr.int'
is.param.valid(param, value)

## S3 method for class 'param.fixed'
is.param.valid(param, value)

Arguments

param

An object of type 'param'

value

A vector of values to validate

Value

A logical vector indicating if value was valid.

Examples

1
2
3
4
p <- param.discrete(c('heads', 'tails'))
is.param.valid(p, 'heads') # true
is.param.valid(p, 'tails') # true
is.param.valid(p, 'neither heads nor tails') # false

paleolimbot/easyoptim documentation built on May 24, 2019, 6:12 p.m.