Skip to content

Instantly share code, notes, and snippets.

@tota
Created June 1, 2013 19:38
Show Gist options
  • Save tota/5691501 to your computer and use it in GitHub Desktop.
Save tota/5691501 to your computer and use it in GitHub Desktop.
- Fix the result of xmlRoot because of changing the layout in table.yahoo.co.jp
--- 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) ){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment