Learn R Programming

tolBasis (version 1.0)

Ratio: Ratio Class

Description

Implements the TOL grammar "Ratio" in R.

Usage

Ratio(num, den) "as.character"(x, ...) "print"(x, ...)

Arguments

num, den, x
Ratio objects
...
further arguments

Value

The method print prints the expression of the Ratio object and returns it.

See Also

See the generic function print and the relative function for Polyn objects: print.Polyn.

Examples

Run this code
# Gets the Ratio object expression as in TOL
as.character(Ratio(1, A+B), forward="F")
# Prints the Ratio object as in TOL
print(Ratio(1, A+B), forward="F")

Run the code above in your browser using DataLab