param_character: Define Character Parameters

View source: R/parameters.R

param_characterR Documentation

Define Character Parameters

Description

Define a character parameter.

Usage

param_character(
  id,
  type = "character",
  default = NULL,
  alternatives,
  force = FALSE,
  description = NULL,
  process = "simulation",
  function_name
)

Arguments

id

A parameter name.

type

The type of parameter. Must be characters.

default

The default values. Length to one or more.

alternatives

Options that can be chosen.

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

dimension_method <- param_character(
id = 'dimension_method',
default = "UMAP",
process = "estimation",
alternatives = c("UMAP", "TSNE", "PCA"),
force = TRUE,
description = "The algorithm to use for dimension reduction."
)

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