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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jun 3 01:44:40 CEST 2012


Author: gsee
Date: 2012-06-03 01:44:40 +0200 (Sun, 03 Jun 2012)
New Revision: 1037

Modified:
   pkg/FinancialInstrument/R/update_instruments.yahoo.R
Log:
 isTRUE(silent) should take place inside if statement

Modified: pkg/FinancialInstrument/R/update_instruments.yahoo.R
===================================================================
--- pkg/FinancialInstrument/R/update_instruments.yahoo.R	2012-06-02 19:14:48 UTC (rev 1036)
+++ pkg/FinancialInstrument/R/update_instruments.yahoo.R	2012-06-02 23:44:40 UTC (rev 1037)
@@ -133,10 +133,12 @@
         Symbols <- ls_stocks()
     }
     df <- df[df[["Symbol"]] %in% Symbols, ]
-    if (nrow(df) == 0 && !isTRUE(silent)) {
-        warning(paste(paste(Symbols,collapse=","), 
-                      "not found among those listed on", 
-                      paste(exchange,collapse=", ")))
+    if (nrow(df) == 0) {
+        if (!isTRUE(silent)) {
+            warning(paste(paste(Symbols,collapse=","), 
+                          "not found among those listed on", 
+                          paste(exchange,collapse=", ")))
+        }
         return(invisible(NULL))
     }
     if (!isTRUE(silent)) {



More information about the Blotter-commits mailing list