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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 23 14:18:32 CET 2015


Author: mvkorpel
Date: 2015-03-23 14:18:32 +0100 (Mon, 23 Mar 2015)
New Revision: 976

Modified:
   pkg/dplR/ChangeLog
   pkg/dplR/DESCRIPTION
   pkg/dplR/R/redfit.R
Log:
Fixed a bug where redfit() would fail if "stats" was not attached.


Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog	2015-03-13 11:15:58 UTC (rev 975)
+++ pkg/dplR/ChangeLog	2015-03-23 13:18:32 UTC (rev 976)
@@ -89,6 +89,12 @@
   value of the argument.  Reported by Daniel Bishop and Neil
   Pederson.
 
+File: redfit.R
+--------------
+
+- Fixed a bug where redfit() would fail if the "stats" package was
+  not attached.
+
 File: write.tridas.R
 --------------------
 

Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION	2015-03-13 11:15:58 UTC (rev 975)
+++ pkg/dplR/DESCRIPTION	2015-03-23 13:18:32 UTC (rev 976)
@@ -3,7 +3,7 @@
 Type: Package
 Title: Dendrochronology Program Library in R
 Version: 1.6.3
-Date: 2015-03-13
+Date: 2015-03-23
 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/redfit.R
===================================================================
--- pkg/dplR/R/redfit.R	2015-03-13 11:15:58 UTC (rev 975)
+++ pkg/dplR/R/redfit.R	2015-03-23 13:18:32 UTC (rev 976)
@@ -314,8 +314,9 @@
         ww[, i] <- redfitWinwgt(twk, iwin2)
     }
     ## determine autospectrum of input data
-    lmfitfun <- tryCatch(match.fun(".lm.fit"),
-                         error = function(...) match.fun("lm.fit"))
+    lmfitfun <-
+        tryCatch(getExportedValue("stats", ".lm.fit"),
+                 error = function(...) getExportedValue("stats", "lm.fit"))
     gxx <- .Call(dplR.spectr, t2, x2, np, ww, tr[[1]], tr[[2]], tr[[3]],
                  nseg, nfreq, avgdt, freq, dn50, segskip, lmfitfun)
     ## estimate data variance from autospectrum



More information about the Dplr-commits mailing list