[Blotter-commits] r1279 - in pkg/FinancialInstrument: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Dec 12 18:10:37 CET 2012


Author: gsee
Date: 2012-12-12 18:10:37 +0100 (Wed, 12 Dec 2012)
New Revision: 1279

Modified:
   pkg/FinancialInstrument/.Rbuildignore
   pkg/FinancialInstrument/NEWS
   pkg/FinancialInstrument/R/update_instruments.iShares.R
Log:
 - replace paste0() calls with paste(... sep="")
 - .Rbuildignore edited by RStudio to ignore project files.

Modified: pkg/FinancialInstrument/.Rbuildignore
===================================================================
--- pkg/FinancialInstrument/.Rbuildignore	2012-12-12 11:42:21 UTC (rev 1278)
+++ pkg/FinancialInstrument/.Rbuildignore	2012-12-12 17:10:37 UTC (rev 1279)
@@ -1,3 +1,5 @@
 sandbox
 \.metadata
 \.svn
+^.*\.Rproj$
+^\.Rproj\.user$

Modified: pkg/FinancialInstrument/NEWS
===================================================================
--- pkg/FinancialInstrument/NEWS	2012-12-12 11:42:21 UTC (rev 1278)
+++ pkg/FinancialInstrument/NEWS	2012-12-12 17:10:37 UTC (rev 1279)
@@ -30,6 +30,8 @@
   depends on the relevant table being the 4th on the page; instead it uses
   the table with the most rows.
 
+* Replace paste0() calls with paste() so that R 2.15 in not required.
+
 USER VISIBLE CHANGES
 --------------------
 

Modified: pkg/FinancialInstrument/R/update_instruments.iShares.R
===================================================================
--- pkg/FinancialInstrument/R/update_instruments.iShares.R	2012-12-12 11:42:21 UTC (rev 1278)
+++ pkg/FinancialInstrument/R/update_instruments.iShares.R	2012-12-12 17:10:37 UTC (rev 1279)
@@ -34,8 +34,8 @@
 #' @rdname update_instruments.iShares
 update_instruments.iShares <- function(Symbols, silent=FALSE) {
   tmp <- tempfile()
-  lnk <- paste0("http://us.ishares.com/product_info/fund/excel_returns.htm",
-                "?assetClassCd=EQ&ticker=&asofDt=")
+  lnk <- paste("http://us.ishares.com/product_info/fund/excel_returns.htm",
+                "?assetClassCd=EQ&ticker=&asofDt=", sep="")
   download.file(lnk, destfile=tmp, quiet=TRUE)
   fr <- read.csv(tmp, skip=3, stringsAsFactors=FALSE, header=FALSE)
   colnames(fr) <- read.delim(text=readLines(tmp, 1), sep=",", header=FALSE, 
@@ -75,8 +75,9 @@
 #' @rdname update_instruments.iShares
 update_instruments.SPDR <- function(Symbols, silent=FALSE) {
   tmp <- tempfile()
-  lnk <- paste0("https://www.spdrs.com/library-content/public/public-files/etf",
-                "nav.csv?docname=Most+Recent+Net+Asset+Values&onyx_code1=1299")
+  lnk <- paste("https://www.spdrs.com/library-content/public/public-files/etf",
+                "nav.csv?docname=Most+Recent+Net+Asset+Values&onyx_code1=1299",
+               sep="")
   download.file(lnk, destfile=tmp, method="curl")
   fr <- read.csv(tmp, skip=1, stringsAsFactors=FALSE)
   DATE <- gsub(" ", "", sub("DATE,", "", readLines(tmp, 1)))



More information about the Blotter-commits mailing list