Learn R Programming

polyMatrix (version 0.3.1)

print: Prints a polynomial matrix or a varma model in the given form

Description

Printing method for class polyMatrix and pMvarma.

Usage

# S3 method for polyMatrix
print(
    x, style=c("matrix", "polynom", "broad", "raw"),
    round=NULL,digits=getOption("digits"), shift = 3, decreasing = FALSE, ...
)
# S3 method for pMvarma
print(
    x, style=c("matrix", "polynom", "broad", "raw"),
    round=NULL,digits=getOption("digits"), shift = 3, ...
)

Arguments

x

a polyMatrix or pMvarma class object to be printed

style

one of the four printing types

round

rounds as the base::round() function

digits

the number of significant digits to be printed

shift

the beginnig shift

decreasing

the terms of the polynomial in decreasing order or not

additional arguments

See Also

print

Examples

Run this code
# NOT RUN {
set.seed(1)
pm <- polyMgen.a(rand=function(x) rpois(x,1))


pa <- polyMconvert(pm,"polyMarray") # class: "polyMarray" "polyMatrix"
pb <- polyMconvert(pm,"polyMbroad") # class: "polyMbroad" "polyMatrix"
pc <- polyMconvert(pm,"polyMcells") # class: "polyMcells" "polyMatrix"
pd <- polyMconvert(pm,"polyMdlist") # class: "polyMdlist" "polyMatrix"
# clean up
# rm(pm)

# the default, the "matrix" print image style: matrix of polynomials
pa
pb
pc
pd

# the three other print image style:
print(pa,"poly")
print(pa,"broad")
print(pa,"raw")

print(pb,"poly")
print(pb,"broad")
print(pb,"raw")

print(pc,"poly")
print(pc,"broad")
print(pc,"raw")

print(pd,"poly")
print(pd,"broad")
print(pd,"raw")

# clean up
# rm(pa,pb,pc,pd)

varma <- polyMgen.varma()

varma
print(varma,"matrix") # the same print image
print(varma,"poly")
print(varma,"broad")
print(varma,"raw")

# clean up
# rm(varma)

# }

Run the code above in your browser using DataLab