print.spray

0th

Percentile

Print methods for spray objects

Print methods for spray objects with options for printing in matrix form or multivariate polynomial form

Keywords
symbolmath
Usage
# S3 method for spray
print(x, ...)
print_spray_matrixform(S)
print_spray_polyform(S)
Arguments
x,S

spray object

...

Further arguments (currently ignored)

Details

The print method, print.spray(), dispatches to helper functions print_spray_matrixform() and print_spray_polyform() depending on the value of option polyform; see examples section.

Option sprayvars is a character vector with entries corresponding to the variable names for printing.

Note that printing a spray object (in either matrix form or polynomial form) generally takes much longer than calculating it.

Value

Returns its argument invisibly.

Note

There are a couple of hard-wired symbols for multiplication and equality which are defined near the top of the helper functions.

Aliases
  • print.spray
  • sprayvars
  • print_spray_matrixform
  • print_spray_polyform
Examples
# NOT RUN {
(a <- spray(diag(3)))


options(polyform = FALSE)
a^3

options(polyform = TRUE)
a^3


options(sprayvars=letters)
a <- diag(26)
spray(a)

## Following example from mpoly:
a[1 + cbind(0:25, 1:26) %% 26] <- 2
spray(a)



# }
Documentation reproduced from package spray, version 1.0-8, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.