[Dplr-commits] r682 - branches/redfit/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Sep 4 11:21:05 CEST 2013
Author: mvkorpel
Date: 2013-09-04 11:21:05 +0200 (Wed, 04 Sep 2013)
New Revision: 682
Modified:
branches/redfit/R/powt.R
Log:
Use lm.fit() instead of lm().
Avoids codetools nag about possibly unused variable.
Modified: branches/redfit/R/powt.R
===================================================================
--- branches/redfit/R/powt.R 2013-09-04 09:15:23 UTC (rev 681)
+++ branches/redfit/R/powt.R 2013-09-04 09:21:05 UTC (rev 682)
@@ -28,8 +28,8 @@
runn.M <- (drop.1 + drop.n) / 2
runn.S <- abs(drop.1 - drop.n)
runn.S[runn.S == 0] <- prec # add minimal difference
- mod <- lm(log(runn.S) ~ log(runn.M))
- b <- coef(mod)[2]
+ mod <- lm.fit(cbind(1, log(runn.M)), log(runn.S))
+ b <- mod[["coefficients"]][2]
1 - b
}
transf <- function(x) {
More information about the Dplr-commits
mailing list