showQspray | R Documentation |
Prints a qspray
object given a function which prints
the monomials.
showQspray(showMonomial, compact = FALSE, multiplication = "*")
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 |
multiplication |
used to separate the coefficient and the monomial within a term |
A function which prints a qspray
object.
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
.
showQsprayX1X2X3
, showQsprayXYZ
,
showQsprayOption<-
.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.