[Blotter-commits] r1462 - in pkg/FinancialInstrument: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed May 8 17:02:00 CEST 2013
Author: gsee
Date: 2013-05-08 17:02:00 +0200 (Wed, 08 May 2013)
New Revision: 1462
Modified:
pkg/FinancialInstrument/DESCRIPTION
pkg/FinancialInstrument/R/update_instruments.morningstar.R
Log:
patches for changes in package:XML
Modified: pkg/FinancialInstrument/DESCRIPTION
===================================================================
--- pkg/FinancialInstrument/DESCRIPTION 2013-05-07 22:09:11 UTC (rev 1461)
+++ pkg/FinancialInstrument/DESCRIPTION 2013-05-08 15:02:00 UTC (rev 1462)
@@ -9,7 +9,7 @@
Contributors: Dirk Eddelbuettel, Alexis Petit, Jeffrey Ryan, Joshua Ulrich
Description: Infrastructure for defining meta-data and
relationships for financial instruments.
-Version: 1.1.7
+Version: 1.1.8
URL: https://r-forge.r-project.org/projects/blotter/
Date: 2013-03-03
Depends:
@@ -19,7 +19,7 @@
zoo(>= 1.7-5)
Suggests:
foreach,
- XML,
+ XML (>= 3.96.1.1),
testthat
Collate:
'buildHierarchy.R'
Modified: pkg/FinancialInstrument/R/update_instruments.morningstar.R
===================================================================
--- pkg/FinancialInstrument/R/update_instruments.morningstar.R 2013-05-07 22:09:11 UTC (rev 1461)
+++ pkg/FinancialInstrument/R/update_instruments.morningstar.R 2013-05-08 15:02:00 UTC (rev 1462)
@@ -28,9 +28,9 @@
x <- readHTMLTable(paste("http://news.morningstar.com/etf/Lists/ETFReturn",
"s.html?topNum=All&lastRecNum=1000&curField=8&ca",
"tegory=0", sep=""), stringsAsFactors=FALSE)
- x <- x[[which.max(sapply(x, nrow))]]
- colnames(x) <- x[2, ]
- x <- x[-c(1:3), -1]
+ x <- x[[which.max(sapply(x, NROW))]]
+ colnames(x) <- x[1, ]
+ x <- x[-c(1:2), -1]
x <- x[!is.na(x[, 1]), ]
x <- x[!duplicated(x[, 1]), ]
tickers <- gsub(".*\\(|*\\)", "", x[,1])
More information about the Blotter-commits
mailing list