permuteVariables {qspray}R Documentation

Permute variables

Description

Permute the variables of a qspray polynomial.

Usage

## S4 method for signature 'qspray,numeric'
permuteVariables(x, permutation)

Arguments

x

a qspray object

permutation

a permutation

Value

A qspray object.

Examples

library(qspray)
f <- function(x, y, z) {
  x^2 + 5*y + z - 1
}
x <- qlone(1)
y <- qlone(2)
z <- qlone(3)
P <- f(x, y, z)
permutation <- c(3, 1, 2)
Q <- permuteVariables(P, permutation)
Q == f(z, x, y) # should be TRUE

[Package qspray version 3.1.0 Index]