Learn R Programming

Tex4exams (version 0.1.2)

signF: Show minus sign in front of fractions

Description

The minus sign in fractions should be in front of the fraction for display purpose, while many numerical algorithms may produce fractions with minus sign in the numerator. This function modifies the output of those packages into the correct display form in TeX code.

Usage

signF(a)

Value

The function returns one of the symbols "-" for negative numbers, or empty "" for nonnegative ones.

Arguments

a

a numeric number.

See Also

rfracF

Examples

Run this code
a <- sample(c((-10):10),1)/100
signF(a)

Run the code above in your browser using DataLab