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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 19 09:55:16 CEST 2014


Author: mvkorpel
Date: 2014-05-19 09:55:16 +0200 (Mon, 19 May 2014)
New Revision: 883

Modified:
   pkg/dplR/DESCRIPTION
   pkg/dplR/R/morlet.R
Log:
A tiny optimization to morlet()


Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION	2014-05-17 13:21:09 UTC (rev 882)
+++ pkg/dplR/DESCRIPTION	2014-05-19 07:55:16 UTC (rev 883)
@@ -3,7 +3,7 @@
 Type: Package
 Title: Dendrochronology Program Library in R
 Version: 1.6.1
-Date: 2014-05-17
+Date: 2014-05-19
 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/morlet.R
===================================================================
--- pkg/dplR/R/morlet.R	2014-05-17 13:21:09 UTC (rev 882)
+++ pkg/dplR/R/morlet.R	2014-05-19 07:55:16 UTC (rev 883)
@@ -98,11 +98,12 @@
     dof <- 2
     Signif <- fft_theor * qchisq(siglvl, dof) / dof   # [Eqn(18)]
 
-    Power <- abs(wave[seq_len(n1), , drop=FALSE])
+    wave2 <- wave[seq_len(n1), , drop=FALSE]
+    Power <- abs(wave2)
     Power <- Power * Power  # Compute wavelet power spectrum
 
     ## Done
-    list(y=y1, x=x1, wave = wave[seq_len(n1), , drop=FALSE], coi = coi,
+    list(y=y1, x=x1, wave = wave2, coi = coi,
          period = period, Scale = Scale, Signif = Signif, Power = Power,
          siglvl = siglvl)
 }



More information about the Dplr-commits mailing list