swh:1:snp:1d6f9c912933e835b749aef1f8077112982fe84e
Raw File
Tip revision: 85eeff77b2e878cc9dbd7659e4acbc035be93c28 authored by Hans W. Borchers on 22 September 2022, 13:50:02 UTC
version 2.4.2
Tip revision: 85eeff7
poly2str.Rd
\name{poly2str}
\alias{poly2str}
\title{
  Print Polynomial
}
\description{
  Print polynomial as a character string.
}
\usage{
poly2str(p, svar = "x", smul = "*", d = options("digits")$digits)
}
\arguments{
  \item{p}{numeric vector representing a polynomial}
  \item{svar}{character representing the unknown, default \code{x}.}
  \item{smul}{multiplication symbol, default \code{*}.}
  \item{d}{significant digits, default \code{options("digits")}.}
}
\details{
  Simple string manipulation.
}
\value{
  Returns the usual string representing a polynomial in mathematics.
}
\examples{
poly2str(c(0))
poly2str(c(1, -1, 1, -1, 1))
poly2str(c(0, 1e-6, 1e6), d = 2)
}
\keyword{ array }
back to top