showQsprayOption<- {qspray}R Documentation

Set a show option to a 'qspray' object

Description

Set a show option to a qspray object

Usage

showQsprayOption(x, which) <- value

Arguments

x

a qspray object

which

which option to set; this can be "x", "showMonomial", or "showQspray"

value

the value of the option

Value

This returns the updated qspray.

Note

The interest of setting some show options to a 'qspray' is that these options are preserved by some operations. See the examples and the README.

Examples

set.seed(3141)
( qspray <- rQspray() )
showQsprayOption(qspray, "x") <- "a"
qspray
# this is identical to:
showQsprayOption(qspray, "showMonomial") <- showMonomialX1X2X3("a")
# and also identical to:
showQsprayOption(qspray, "showQspray") <- showQsprayX1X2X3("a")
# old show method:
showQsprayOption(qspray, "showMonomial") <- showMonomialOld()
qspray
# show options are preserved by some operations:
qspray^2
3*qspray
derivQspray(qspray, 1)
swapVariables(qspray, 1, 2)
substituteQspray(qspray, c(NA, NA, "3/2"))
# for the binary arithmetic operations, the show options of the first 
# operand are transferred to the result when possible:
( qspray2 <- rQspray() )
qspray + qspray2 

[Package qspray version 3.0.0 Index]