numValueString: numValueString

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Returns numerical value with requested unit in Latex format with numDigits number of decimal places and unit symbol.

Usage

1
numValueString(value, numDigits = 2, unit = "")

Arguments

value

number

numDigits

number 2 (default)

unit

"ms", "mv", "mV", or "%" or "" (default)

Value

character

Examples

1
2
3
4
5
6
7
8
# Example 1:
string <- numValueString(100.341, 0, "ms")

# Example 2:
string <- numValueString(2.3412, 2, "mv")

# Example 3:
string <- numValueString(63.9812, 2, "")

psychReport documentation built on May 6, 2021, 5:05 p.m.