param_integer: Define Integer Parameters

View source: R/parameters.R

param_integerR Documentation

Define Integer Parameters

Description

Define an integer parameter.

Usage

param_integer(
  id,
  type = "integer",
  default = NULL,
  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 an integer.

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

group_num <- param_integer(
id = "group_num",
default = 1L,
lower = 1L,
upper = 50L,
border = TRUE,
process = "estimation",
description = "How many groups to be simulated"
)

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