showQspray {qspray}R Documentation

Print a 'qspray' object

Description

Prints a qspray object given a function which prints the monomials.

Usage

showQspray(showMonomial, compact = FALSE, multiplication = "*")

Arguments

showMonomial

a function which takes as argument a sequence of exponents and which returns a string representing the corresponding monomial

compact

a Boolean value; if TRUE, then the + sign and the - sign will not be surrounded by spaces

multiplication

used to separate the coefficient and the monomial within a term

Value

A function which prints a qspray object.

Note

The function returned by this function can be used as the option "showQspray" in the showQsprayOption<- function. But one generally prefers to use showQsprayX1X2X3 or showQsprayXYZ instead, which are both built with showQspray.

See Also

showQsprayX1X2X3, showQsprayXYZ, showQsprayOption<-.

Examples

set.seed(3141)
( qspray <- rQspray() )
f <- showQspray(showMonomialX1X2X3("X"), compact = TRUE)
f(qspray)
# this is equivalent to:
f <- showQsprayX1X2X3("X", compact = TRUE)
f(qspray)
# if you want to adopt this way to show a qspray, use 
# the setter function \code{\link{showQsprayOption<-}}: 
showQsprayOption(qspray, "showQspray") <- 
  showQsprayX1X2X3("X", compact = TRUE)
qspray
# then this show option will be preserved by some operations on the qspray:
qspray^2

[Package qspray version 3.1.0 Index]