Skip to content

A bug in princomp(), perhaps?

3 messages · Ben Bolker, Ravi Varadhan

#
Ben Bolker <bbolker <at> gmail.com> writes:
Putting my effort where my mouth is: I wonder if there is any chance
that this patch against the current SVN would be accepted ... ??

Index: princomp.Rd
===================================================================
--- princomp.Rd	(revision 65832)
+++ princomp.Rd	(working copy)
@@ -37,7 +37,8 @@
     when the data contain \code{NA}s.  The default is set by
     the \code{na.action} setting of \code{\link{options}}, and is
     \code{\link{na.fail}} if that is unset. The \sQuote{factory-fresh}
-    default is \code{\link{na.omit}}.}
+    default is \code{\link{na.omit}}.  (This argument applies \emph{only}
+    to the formula method.)}
   \item{x}{a numeric matrix or data frame which provides the data for the
     principal components analysis.}
   \item{cor}{a logical value indicating whether the calculation should
Index: prcomp.Rd
===================================================================
--- prcomp.Rd	(revision 65832)
+++ prcomp.Rd	(working copy)
@@ -40,7 +40,8 @@
     when the data contain \code{NA}s.  The default is set by
     the \code{na.action} setting of \code{\link{options}}, and is
     \code{\link{na.fail}} if that is unset. The \sQuote{factory-fresh}
-    default is \code{\link{na.omit}}.}
+    default is \code{\link{na.omit}}. (This argument applies \emph{only}
+    to the formula method.)}
   \item{\dots}{arguments passed to or from other methods. If \code{x} is
     a formula one might specify \code{scale.} or \code{tol}.}
   \item{x}{a numeric or complex matrix (or data frame) which provides
#
Thank you, Ben.  

Best,
Ravi

-----Original Message-----
From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-project.org] On Behalf Of Ben Bolker
Sent: Monday, June 02, 2014 8:07 PM
To: r-devel at stat.math.ethz.ch
Subject: Re: [Rd] A bug in princomp(), perhaps?

Ben Bolker <bbolker <at> gmail.com> writes:
Putting my effort where my mouth is: I wonder if there is any chance that this patch against the current SVN would be accepted ... ??

Index: princomp.Rd
===================================================================
--- princomp.Rd	(revision 65832)
+++ princomp.Rd	(working copy)
@@ -37,7 +37,8 @@
     when the data contain \code{NA}s.  The default is set by
     the \code{na.action} setting of \code{\link{options}}, and is
     \code{\link{na.fail}} if that is unset. The \sQuote{factory-fresh}
-    default is \code{\link{na.omit}}.}
+    default is \code{\link{na.omit}}.  (This argument applies \emph{only}
+    to the formula method.)}
   \item{x}{a numeric matrix or data frame which provides the data for the
     principal components analysis.}
   \item{cor}{a logical value indicating whether the calculation should
Index: prcomp.Rd
===================================================================
--- prcomp.Rd	(revision 65832)
+++ prcomp.Rd	(working copy)
@@ -40,7 +40,8 @@
     when the data contain \code{NA}s.  The default is set by
     the \code{na.action} setting of \code{\link{options}}, and is
     \code{\link{na.fail}} if that is unset. The \sQuote{factory-fresh}
-    default is \code{\link{na.omit}}.}
+    default is \code{\link{na.omit}}. (This argument applies \emph{only}
+    to the formula method.)}
   \item{\dots}{arguments passed to or from other methods. If \code{x} is
     a formula one might specify \code{scale.} or \code{tol}.}
   \item{x}{a numeric or complex matrix (or data frame) which provides

______________________________________________
R-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
#
Perhaps, adding Gavin's work around for a dataframe with missing values might also be useful to the documentation:

princomp(na.omit(x))

Thanks,
Ravi

-----Original Message-----
From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-project.org] On Behalf Of Ben Bolker
Sent: Monday, June 02, 2014 8:07 PM
To: r-devel at stat.math.ethz.ch
Subject: Re: [Rd] A bug in princomp(), perhaps?

Ben Bolker <bbolker <at> gmail.com> writes:
Putting my effort where my mouth is: I wonder if there is any chance that this patch against the current SVN would be accepted ... ??

Index: princomp.Rd
===================================================================
--- princomp.Rd	(revision 65832)
+++ princomp.Rd	(working copy)
@@ -37,7 +37,8 @@
     when the data contain \code{NA}s.  The default is set by
     the \code{na.action} setting of \code{\link{options}}, and is
     \code{\link{na.fail}} if that is unset. The \sQuote{factory-fresh}
-    default is \code{\link{na.omit}}.}
+    default is \code{\link{na.omit}}.  (This argument applies \emph{only}
+    to the formula method.)}
   \item{x}{a numeric matrix or data frame which provides the data for the
     principal components analysis.}
   \item{cor}{a logical value indicating whether the calculation should
Index: prcomp.Rd
===================================================================
--- prcomp.Rd	(revision 65832)
+++ prcomp.Rd	(working copy)
@@ -40,7 +40,8 @@
     when the data contain \code{NA}s.  The default is set by
     the \code{na.action} setting of \code{\link{options}}, and is
     \code{\link{na.fail}} if that is unset. The \sQuote{factory-fresh}
-    default is \code{\link{na.omit}}.}
+    default is \code{\link{na.omit}}. (This argument applies \emph{only}
+    to the formula method.)}
   \item{\dots}{arguments passed to or from other methods. If \code{x} is
     a formula one might specify \code{scale.} or \code{tol}.}
   \item{x}{a numeric or complex matrix (or data frame) which provides

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