[Blotter-commits] r647 - pkg/RTAQ/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 29 04:12:26 CEST 2011


Author: kboudt
Date: 2011-06-29 04:12:23 +0200 (Wed, 29 Jun 2011)
New Revision: 647

Modified:
   pkg/RTAQ/R/periodicityTAQ.R
Log:
better handling na's in seas

Modified: pkg/RTAQ/R/periodicityTAQ.R
===================================================================
--- pkg/RTAQ/R/periodicityTAQ.R	2011-06-28 20:35:35 UTC (rev 646)
+++ pkg/RTAQ/R/periodicityTAQ.R	2011-06-29 02:12:23 UTC (rev 647)
@@ -112,8 +112,8 @@
             seas[c] = WSDnozero(weights[, c], stddata[, c])
         }
     }
-    # new: 
-    seas = na.locf(seas)
+    seas = na.locf(seas,na.rm=F) #do not remove leading NA
+    seas = na.locf(seas,fromLast=T)
     seas = seas/sqrt(mean(seas^2))
     if (method == "OLS" | method == "TML") {
         c = center()



More information about the Blotter-commits mailing list