plug: Switch indeterminates in a polynomial

Description Usage Arguments Value Examples

View source: R/plug.R

Description

Switch indeterminates in a polynomial

Usage

1
plug(p, indeterminate, value)

Arguments

p

a polynomial

indeterminate

the indeterminate in the polynomial to switch

value

the value/indeterminate to substitute

Value

an mpoly object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# on an mpoly
(p <- mp("(x+y)^3"))
plug(p, "x", 5)
plug(p, "x", "t")
plug(p, "x", "y")
plug(p, "x", mp("2 y"))

plug(p, "x", mp("x + y"))
mp("((x+y)+y)^3")

# on an mpolyList
ps <- mp(c("x+y", "x+1"))
plug(ps, "x", 1)

mpoly documentation built on March 26, 2020, 7:33 p.m.