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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 4 02:20:00 CEST 2012


Author: gsee
Date: 2012-06-04 02:19:59 +0200 (Mon, 04 Jun 2012)
New Revision: 1040

Modified:
   pkg/FinancialInstrument/R/find.instrument.R
Log:
 useBytes in grep to avoid warning about invalid input in multibyte locales.

Modified: pkg/FinancialInstrument/R/find.instrument.R
===================================================================
--- pkg/FinancialInstrument/R/find.instrument.R	2012-06-03 23:50:43 UTC (rev 1039)
+++ pkg/FinancialInstrument/R/find.instrument.R	2012-06-04 00:19:59 UTC (rev 1040)
@@ -63,5 +63,6 @@
         instrument.table(Symbols, exclude=exclude)
     } else buildHierarchy(Symbols, where[!where %in% exclude])
     unique(tbl[unique(unname(unlist(apply(tbl, 2, function(x) 
-        grep(pattern=text, x=x, ignore.case=ignore.case, ...))))), 1])
+        grep(pattern=text, x=x, ignore.case=ignore.case, 
+             useBytes=TRUE, ...))))), 1])
 }



More information about the Blotter-commits mailing list