Learn R Programming

psychReport (version 3.0.2)

mathString: 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

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

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

Run the code above in your browser using DataLab