Polyn: Polyn Class

Description Usage Arguments Value See Also Examples

View source: R/polyn.R

Description

Implements the TOL grammar "Polyn" in R.

Usage

1
2
3
4
5
6
# Creates a new Polyn Object
Polyn(coeffs, base=0)
## S3 method for class 'Polyn'
as.character(x, ..., backward="B", forward="A")
## S3 method for class 'Polyn'
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

1
2
3
4
5
6
# 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")

tolBasis documentation built on May 29, 2017, 5:18 p.m.

Search within the tolBasis package
Search all R packages, documentation and source code