mathString: mathString

View source: R/utils.R

mathStringR Documentation

mathString

Description

Returns formatted string following addition/subtraction.

Usage

mathString(str1, str2, operation = "-", numDigits = 0, unit = "ms")

Arguments

str1

string

str2

string

operation

"+", "-", "*", "/"

numDigits

number 0 (default)

unit

"ms" , "mV" , "mv", or "%"

Examples

# Example 1:
string <- mathString("550 ms", "480 ms", "-")

# Example 2:
string <- mathString("2.34", "1.65", "+", numDigits = 2, unit = "mV")


psychReport documentation built on Sept. 9, 2022, 5:08 p.m.