[Blotter-commits] r1150 - pkg/blotter/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 3 20:40:32 CEST 2012


Author: gsee
Date: 2012-09-03 20:40:31 +0200 (Mon, 03 Sep 2012)
New Revision: 1150

Modified:
   pkg/blotter/R/updatePosPL.R
Log:
 need to check is.na before making other comparison.  (but I think this whole check should be removed because it is taken care of earlier)

Modified: pkg/blotter/R/updatePosPL.R
===================================================================
--- pkg/blotter/R/updatePosPL.R	2012-09-02 15:49:40 UTC (rev 1149)
+++ pkg/blotter/R/updatePosPL.R	2012-09-03 18:40:31 UTC (rev 1150)
@@ -39,7 +39,7 @@
         Dates = xts:::time.xts(prices[Dates])
     }
 
-    if(.parseISO8601(Dates)$first.time < as.POSIXct(first(index(prices))) || is.na(.parseISO8601(Dates)$first.time)){
+    if(is.na(.parseISO8601(Dates)$first.time) ||.parseISO8601(Dates)$first.time < as.POSIXct(first(index(prices)))){
         Dates<-index(prices[paste('/',.parseISO8601(Dates)$last.time,sep='')])
     }
     



More information about the Blotter-commits mailing list