From 38a2a5f111d85c0f196bf52ec804a2e3a5d009f8 Mon Sep 17 00:00:00 2001 From: TAKATSU Tomonari Date: Sat, 1 Jun 2013 21:47:52 +0000 Subject: - Add a patch to fix the result of xmlRoot because of changing the layout in table.yahoo.co.jp - Replace tab with a space after WWW: in pkg-descr --- finance/R-cran-RFinanceYJ/Makefile | 2 +- finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R | 11 +++++++++++ finance/R-cran-RFinanceYJ/pkg-descr | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R (limited to 'finance/R-cran-RFinanceYJ') diff --git a/finance/R-cran-RFinanceYJ/Makefile b/finance/R-cran-RFinanceYJ/Makefile index d1c247d7f54d..0d9cd581bc85 100644 --- a/finance/R-cran-RFinanceYJ/Makefile +++ b/finance/R-cran-RFinanceYJ/Makefile @@ -3,7 +3,7 @@ PORTNAME= RFinanceYJ PORTVERSION= 0.1.6 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= finance DISTNAME= ${PORTNAME}_${PORTVERSION} diff --git a/finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R b/finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R new file mode 100644 index 000000000000..b965cf15dc44 --- /dev/null +++ b/finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R @@ -0,0 +1,11 @@ +--- R/quoteStockTsData.R.orig 2011-03-24 23:34:43.000000000 +0900 ++++ R/quoteStockTsData.R 2013-06-02 04:03:12.000000000 +0900 +@@ -56,7 +56,7 @@ + try( r <- xmlRoot(htmlTreeParse(quote.url,error=xmlErrorCumulator(immediate=F))), TRUE) + if( is.null(r) ) stop(paste("Can not access :", quote.url)) + +- try( quote.table <- r[[2]][[1]][[1]][[16]][[1]][[1]][[1]][[4]][[1]][[1]][[1]], TRUE ) ++ try( quote.table <- r[[2]][[1]][[1]][[13]][[1]][[1]][[1]][[4]][[1]][[1]][[1]], TRUE ) + # + if( is.null(quote.table) ){ + if( is.null(financial.data) ){ diff --git a/finance/R-cran-RFinanceYJ/pkg-descr b/finance/R-cran-RFinanceYJ/pkg-descr index 53ca13e1634c..fae3b5a35c50 100644 --- a/finance/R-cran-RFinanceYJ/pkg-descr +++ b/finance/R-cran-RFinanceYJ/pkg-descr @@ -1,3 +1,3 @@ Japanese stock market from Yahoo!-finance-Japan -WWW: http://cran.r-project.org/web/packages/RFinanceYJ/ +WWW: http://cran.r-project.org/web/packages/RFinanceYJ/ -- cgit v1.2.3