showMonomialXYZ {qspray} | R Documentation |
Print a monomial
Description
Prints a monomial like "x.z^2"
if possible (see details).
Usage
showMonomialXYZ(letters = c("x", "y", "z"), collapse = ".")
Arguments
letters |
a vector of strings, usually some letters such as |
collapse |
a string to denote the symbol representing the
multiplication, e.g. |
Details
If the function returned by this function is applied to a vector
of exponents whose length is higher than the length of the letters
vector, then showMonomialX1X2X3(x=letters[1])
is applied
(see the last example).
Value
A function which takes as argument a sequence of exponents and which prints the corresponding monomial.
Note
The function returned by this function can be used as the option
"showMonomial"
in the showQsprayOption<-
function.
See Also
showQsprayXYZ
,
showMonomialX1X2X3
, showQsprayOption<-
.
Examples
showMonomialXYZ()(c(1, 0, 2))
showMonomialXYZ(collapse = "*")(c(1, 0, 2))
showMonomialXYZ()(NULL)
# what happens if there are more exponents than letters:
showMonomialXYZ(c("a", "b"), collapse = "*")(c(1, 2, 3))
# same as:
showMonomialX1X2X3("a", collapse = "*")(c(1, 2, 3))
# setting a show option:
set.seed(3141)
( qspray <- rQspray() )
showQsprayOption(qspray, "showMonomial") <- showMonomialXYZ(c("A", "B", "C"))
qspray
# this is equivalent to:
showQsprayOption(qspray, "showQspray") <- showQsprayXYZ(c("A", "B", "C"))
[Package qspray version 3.1.0 Index]