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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 16 02:13:35 CET 2013


Author: peter_carl
Date: 2013-01-16 02:13:34 +0100 (Wed, 16 Jan 2013)
New Revision: 1363

Modified:
   pkg/blotter/R/getBySymbol.R
Log:
- colname fix so will not error if the portfolio has no positions
- thanks for the patch suggested by Dhruv Maheshwari


Modified: pkg/blotter/R/getBySymbol.R
===================================================================
--- pkg/blotter/R/getBySymbol.R	2013-01-15 22:25:10 UTC (rev 1362)
+++ pkg/blotter/R/getBySymbol.R	2013-01-16 01:13:34 UTC (rev 1363)
@@ -41,7 +41,7 @@
         if(is.null(table)) table = tmp_col
         else table = merge(table, tmp_col)
     }
-    colnames(table) = symbols
+    if(length(table) > 0) colnames(table) = symbols
     class(table)<-class(xts())
     return(table)
 ### TODO: NA fill like getByPortfolio



More information about the Blotter-commits mailing list