Learn R Programming

tolBasis (version 1.0)

Polyn: Polyn Class

Description

Implements the TOL grammar "Polyn" in R.

Usage

# Creates a new Polyn Object Polyn(coeffs, base=0) "as.character"(x, ..., backward="B", forward="A") "print"(x, ...)

Arguments

coeffs
a vector of coefficients
base
the degree of the first coefficient
x
a Polyn object
...
further arguments
backward
the character to print the lag operator
forward
the character to print the inverse lag operator

Value

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

See Also

See the generic function print

Examples

Run this code
# Creates lag polynomial: 1+B^2
p <- Polyn(c(1,0,1)) 
# Gets the Polyn object expression as in TOL
as.character(A+B, forward="F")
# Prints the Polyn object as in TOL
print(A+B, forward="F")

Run the code above in your browser using DataLab