[Rcpp-commits] r856 - in pkg/RcppArmadillo: R man src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Mar 7 23:03:26 CET 2010


Author: edd
Date: 2010-03-07 23:03:26 +0100 (Sun, 07 Mar 2010)
New Revision: 856

Modified:
   pkg/RcppArmadillo/R/fastLm.R
   pkg/RcppArmadillo/man/fastLm.Rd
   pkg/RcppArmadillo/src/fastLm.cpp
Log:
a few minor fixes


Modified: pkg/RcppArmadillo/R/fastLm.R
===================================================================
--- pkg/RcppArmadillo/R/fastLm.R	2010-03-07 21:49:08 UTC (rev 855)
+++ pkg/RcppArmadillo/R/fastLm.R	2010-03-07 22:03:26 UTC (rev 856)
@@ -28,15 +28,16 @@
 
 ## What would be nice here:
 ##
-##  fastLm <- function(x, ...) UseMethod("fastLm")
+##   fastLm <- function(x, ...) UseMethod("fastLm")
 ##
-##  fastLm.formula <- ...
+##   fastLm.formula <- ...
 ##
-##  fastLm.default <- ...
+##   fastLm.default <- ...
 ##
-##  print.fastLm <- function(x, ...)
+##   print.fastLm <- function(x, ...)
 ##
-##  summary.fastLm <- function(object, ...
+##   summary.fastLm <- function(object, ...
 ##
-##  print.summary.fastLm <- ...
-
+##   print.summary.fastLm <- ...
+##
+## but on the other hand lm.fit() does not do any of this either

Modified: pkg/RcppArmadillo/man/fastLm.Rd
===================================================================
--- pkg/RcppArmadillo/man/fastLm.Rd	2010-03-07 21:49:08 UTC (rev 855)
+++ pkg/RcppArmadillo/man/fastLm.Rd	2010-03-07 22:03:26 UTC (rev 856)
@@ -26,9 +26,12 @@
 }
 \value{
   \code{fastLm} returns a list with two components:
-  \item{coef}{a vector of coefficients}
-  \item{stderr}{a vector of the (estimated_ standard error of the
-	coefficient estimate}
+  \item{coefficients}{a vector of coefficients}
+  \item{stderr}{a vector of the (estimated) standard errors of the coefficient estimates}
+
+  In other words, no actual \sQuote{fastLm} object is provided unlike
+  for \code{\link{lm()}} or \code{\link[MASS]{rlm}} but rather just a
+  simple list unlike \code{\link{lm.fit}}.
 }
 \seealso{\code{\link{lm}}, \code{\link{lm.fit}}} 
 \references{Armadillo project: \url{http://arma.sourceforge.net/}}
@@ -38,7 +41,7 @@
 }
 \examples{
   data(trees)
-  fastLm( log(trees$Volume),  cbind(rep(1,31), log(trees$Girth)) )
+  flm <- fastLm( log(trees$Volume),  cbind(rep(1,31), log(trees$Girth)) )
 }
 \keyword{regression}
 

Modified: pkg/RcppArmadillo/src/fastLm.cpp
===================================================================
--- pkg/RcppArmadillo/src/fastLm.cpp	2010-03-07 21:49:08 UTC (rev 855)
+++ pkg/RcppArmadillo/src/fastLm.cpp	2010-03-07 22:03:26 UTC (rev 856)
@@ -47,7 +47,7 @@
     						// std.error of estimate 
     arma::colvec stderrest = sqrt( sig2 * diagvec( arma::inv(arma::trans(X)*X)) );
 
-    Rcpp::Pairlist res(Rcpp::Named( "coef", coef),
+    Rcpp::Pairlist res(Rcpp::Named( "coefficients", coef),
                        Rcpp::Named( "stderr", stderrest));
     return res;
 }



More information about the Rcpp-commits mailing list