[Blotter-commits] r750 - pkg/FinancialInstrument/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 5 07:06:57 CEST 2011


Author: gsee
Date: 2011-09-05 07:06:56 +0200 (Mon, 05 Sep 2011)
New Revision: 750

Modified:
   pkg/FinancialInstrument/R/synthetic.R
Log:
moved a warning to inside an if block

Modified: pkg/FinancialInstrument/R/synthetic.R
===================================================================
--- pkg/FinancialInstrument/R/synthetic.R	2011-09-05 04:31:48 UTC (rev 749)
+++ pkg/FinancialInstrument/R/synthetic.R	2011-09-05 05:06:56 UTC (rev 750)
@@ -138,10 +138,10 @@
         for (member in members) {
             tmp_instr <- try(getInstrument(member, silent=TRUE))
             if (inherits(tmp_instr, "try-error") | !is.instrument(tmp_instr)) {                
-                cat(paste("Instrument ", member, " not found, ",sep=""))
                 if(missing(currency) || is.null(currency)) {
                     stop("'currency' must be provided if member instruments are not defined") 
-                } else cat("using currency of", currency, "\n")
+                    warning(paste("Instrument", member, "not found, using currency of", currency))                
+                } 
                 memberlist$currencies[member] <- currency
             }
             else {



More information about the Blotter-commits mailing list