swh:1:snp:1d6f9c912933e835b749aef1f8077112982fe84e
Raw File
Tip revision: d5bfb0e3b7a3211ff2bbe2926e5ba31aa24e4df6 authored by HwB on 09 March 2012, 00:00:00 UTC
version 1.0.1
Tip revision: d5bfb0e
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