Hi All,

As per the discussion today on R-Help:

  https://stat.ethz.ch/pipermail/r-help/2017-July/448132.html

I am attaching a proposed patch for poly.Rd to provide clarifying wording 
relative to naming the 'degree' argument explicitly, in the case where the 'x' 
argument is a matrix, rather than a vector.

This is based upon the svn trunk version of poly.Rd.

Thanks for your consideration.

Regards,

Marc Schwartz

--- polyOLD.Rd  2017-07-13 14:58:16.000000000 -0500
+++ poly.Rd     2017-07-13 14:59:24.000000000 -0500
@@ -26,7 +26,8 @@
    polynomial. \code{x} can also be a matrix.  Missing values are not
    allowed in \code{x}.}
  \item{degree}{the degree of the polynomial.  Must be less than the
-   number of unique points when \code{raw} is false, as by default.}
+   number of unique points when \code{raw} is false, as by default.
+   See \sQuote{Details} below.}
  \item{coefs}{for prediction, coefficients from a previous fit.}
  \item{raw}{if true, use raw and not orthogonal polynomials.}
  \item{simple}{logical indicating if a simple matrix (with no further
@@ -54,8 +55,9 @@
 \details{
   Although formally \code{degree} should be named (as it follows
   \code{\dots}), an unnamed second argument of length 1 will be
-  interpreted as the degree, such that \code{poly(x, 3)} can be used in
-  formulas.
+  interpreted as the degree, only if \code{x} is a vector,
+  such that \code{poly(x, 3)} can be used in formulas. If \code{x} is
+  a matrix, \code{degree} must be named.
 
   The orthogonal polynomial is summarized by the coefficients, which can
   be used to evaluate it via the three-term recursion given in Kennedy

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to