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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Oct 21 01:58:56 CEST 2011


Author: gsee
Date: 2011-10-21 01:58:56 +0200 (Fri, 21 Oct 2011)
New Revision: 823

Modified:
   pkg/FinancialInstrument/R/load.instruments.R
Log:
 getSymbols.FI had bug when dir=""


Modified: pkg/FinancialInstrument/R/load.instruments.R
===================================================================
--- pkg/FinancialInstrument/R/load.instruments.R	2011-10-20 23:18:56 UTC (rev 822)
+++ pkg/FinancialInstrument/R/load.instruments.R	2011-10-20 23:58:56 UTC (rev 823)
@@ -283,7 +283,7 @@
         ndc<-nchar(dir)
         if(substr(dir,ndc,ndc)=='/') dir <- substr(dir,1,ndc-1) #remove trailing forward slash
         ssd <- strsplit(dir,"/")[[1]]
-        if (ssd[length(ssd)] != symbol) dir <- paste(dir,symbol,sep="/")
+        if (identical(character(0), ssd) || ssd[length(ssd)] != symbol) dir <- paste(dir,symbol,sep="/")
         
         fr<-NULL
         



More information about the Blotter-commits mailing list