% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plug.R
\name{plug}
\alias{plug}
\title{Switch indeterminates in a polynomial}
\usage{
plug(p, indeterminate, value)
}
\arguments{
\item{p}{a polynomial}

\item{indeterminate}{the indeterminate in the polynomial to switch}

\item{value}{the value/indeterminate to substitute}
}
\value{
an mpoly object
}
\description{
Switch indeterminates in a polynomial
}
\examples{

# 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)

}
