[Dplr-commits] r896 - in pkg/dplR: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri May 30 11:16:42 CEST 2014


Author: mvkorpel
Date: 2014-05-30 11:16:42 +0200 (Fri, 30 May 2014)
New Revision: 896

Modified:
   pkg/dplR/ChangeLog
   pkg/dplR/DESCRIPTION
   pkg/dplR/R/powt.R
Log:
Patch from Christian Zang:
In powt(), handle cases where the running mean of a series is 0


Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog	2014-05-27 11:47:03 UTC (rev 895)
+++ pkg/dplR/ChangeLog	2014-05-30 09:16:42 UTC (rev 896)
@@ -77,6 +77,11 @@
 
 - Added some input checks
 
+File: powt.R
+------------
+
+- Handle cases where the running mean of a series is 0
+
 New file rasterPlot.R
 ---------------------
 

Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION	2014-05-27 11:47:03 UTC (rev 895)
+++ pkg/dplR/DESCRIPTION	2014-05-30 09:16:42 UTC (rev 896)
@@ -3,7 +3,7 @@
 Type: Package
 Title: Dendrochronology Program Library in R
 Version: 1.6.1
-Date: 2014-05-27
+Date: 2014-05-30
 Authors at R: c(person("Andy", "Bunn", role = c("aut", "cph",
         "cre", "trl"), email = "andy.bunn at wwu.edu"), person("Mikko",
         "Korpela", role = c("aut", "trl")), person("Franco", "Biondi",

Modified: pkg/dplR/R/powt.R
===================================================================
--- pkg/dplR/R/powt.R	2014-05-27 11:47:03 UTC (rev 895)
+++ pkg/dplR/R/powt.R	2014-05-30 09:16:42 UTC (rev 896)
@@ -28,6 +28,7 @@
         runn.M <- (drop.1 + drop.n) / 2
         runn.S <- abs(drop.1 - drop.n)
         runn.S[runn.S == 0] <- prec         # add minimal difference
+        runn.M[runn.M == 0] <- prec
         mod <- lm.fit(cbind(1, log(runn.M)), log(runn.S))
         b <- mod[["coefficients"]][2]
         1 - b



More information about the Dplr-commits mailing list