Learn R Programming

DEXiR (version 1.0.2)

value_text: value_text

Description

Converts a DEXi value to a human-readable character string that can be printed. Used, for instance, by DexiModel$as_character().

Usage

value_text(value, scale, round = NULL)

Value

character.

Arguments

value

Any DEXi value type (see DEXiR-package).

scale

A DexiScale or derived object.

round

An integer number. Indicates the number of decimals for rounding numeric values prior to printing. If NULL, no rounding takes place.

Examples

Run this code
scl <- DexiDiscreteScale(values = c("low", "med", "high"))
value_text(NA, scl)
value_text(1, scl)
value_text(c(1, 3), scl)
value_text(distribution(0.1, 0.2, 0.3), scl)

Run the code above in your browser using DataLab