showMonomialX1X2X3 {qspray}R Documentation

Print a monomial

Description

Prints a monomial in the style of "x1.x3^2".

Usage

showMonomialX1X2X3(x = "x", collapse = ".")

Arguments

x

a string, usually a letter such as "x" or "X", to denote the non-indexed variables

collapse

a string to denote the symbol representing the multiplication, e.g. "*" or ""

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. But if you are happy with the default collapse argument, then you can equivalently set the "x" option instead, thereby typing less code. See the example.

See Also

showQsprayX1X2X3, showMonomialXYZ, showQsprayOption<-.

Examples

showMonomialX1X2X3("X")(c(1, 0, 2))
showMonomialX1X2X3("X", collapse = "*")(c(1, 0, 2))
showMonomialX1X2X3("X")(c(1, 0, 2)) == 
  showMonomialXYZ(c("X1", "X2", "X3"))(c(1, 0, 2))
showMonomialX1X2X3()(NULL)
# setting a show option:
set.seed(3141)
( qspray <- rQspray() )
showQsprayOption(qspray, "showMonomial") <- showMonomialX1X2X3("X")
qspray
# this is equivalent to:
showQsprayOption(qspray, "showQspray") <- showQsprayX1X2X3("X")
# and also equivalent to:
showQsprayOption(qspray, "x") <- "X" 

[Package qspray version 3.1.0 Index]