poly2str(p, svar = "x", smul = "*", d = options("digits")$digits)
Arguments
p
numeric vector representing a polynomial
svar
character representing the unknown, default x.
smul
multiplication symbol, default *.
d
significant digits, default options("digits").
Value
Returns the usual string representing a polynomial in mathematics.
Details
Modified from package *pracma*.
Modification: To hide any coefficient and power that is equal to 1
So that instead of '1s^3' we have 's^3' and instead of 's^1', we have 's'