param_numeric: Define Numeric Parameters

View source: R/parameters.R

param_numericR Documentation

Define Numeric Parameters

Description

Define a numeric parameter.

Usage

param_numeric(
  id,
  type = "numeric",
  default,
  lower = NULL,
  upper = NULL,
  border = TRUE,
  force = FALSE,
  description = NULL,
  process = "simulation",
  function_name
)

Arguments

id

A parameter name.

type

The type of parameter. Must be a numeric.

default

The default value.

lower

The lowest range of this parameter.

upper

The highest range of this parameter.

border

Boolean. Whether the default value can get to the range border.

force

Logical, whether this parameter must be needed or not.

description

The description information of this parameter.

process

Two options, simulation or estimation. Which process does this parameter involved in.

function_name

The function name where the parameter exists.

Value

A list.

Examples

probability <- param_numeric(
id = "probability",
default = 0.5,
lower = 0,
upper = 1,
border = TRUE,
description = "The probability to select the right number"
)

duohongrui/simutils documentation built on March 12, 2024, 8:40 p.m.