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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 15 01:36:24 CEST 2011


Author: gsee
Date: 2011-09-15 01:36:22 +0200 (Thu, 15 Sep 2011)
New Revision: 778

Modified:
   pkg/blotter/R/updatePosPL.R
Log:
 only use 1st column of getPrice if more than 1 are found.

Modified: pkg/blotter/R/updatePosPL.R
===================================================================
--- pkg/blotter/R/updatePosPL.R	2011-09-13 14:00:52 UTC (rev 777)
+++ pkg/blotter/R/updatePosPL.R	2011-09-14 23:36:22 UTC (rev 778)
@@ -27,7 +27,7 @@
     if(!is.null(dargs$symbol)) {symbol<-dargs$symbol} else symbol=NULL
     if(!is.null(dargs$prefer)) {prefer<-dargs$prefer} else prefer=NULL
     if(is.null(Prices)){
-		prices=getPrice(get(Symbol, pos=env), symbol=symbol, prefer=prefer)
+		prices=getPrice(get(Symbol, pos=env), symbol=symbol, prefer=prefer)[,1]
 	} else {
         prices=Prices
     }



More information about the Blotter-commits mailing list