From owner-svn-ports-all@FreeBSD.ORG Thu Jun 27 15:00:46 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6ABC567B; Thu, 27 Jun 2013 15:00:46 +0000 (UTC) (envelope-from tota@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5BB671BC8; Thu, 27 Jun 2013 15:00:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5RF0kEL075912; Thu, 27 Jun 2013 15:00:46 GMT (envelope-from tota@svn.freebsd.org) Received: (from tota@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5RF0j4g075909; Thu, 27 Jun 2013 15:00:45 GMT (envelope-from tota@svn.freebsd.org) Message-Id: <201306271500.r5RF0j4g075909@svn.freebsd.org> From: TAKATSU Tomonari Date: Thu, 27 Jun 2013 15:00:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r321894 - in head/finance/R-cran-RFinanceYJ: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jun 2013 15:00:46 -0000 Author: tota Date: Thu Jun 27 15:00:45 2013 New Revision: 321894 URL: http://svnweb.freebsd.org/changeset/ports/321894 Log: - Update to 0.2.0 with a patch * Fix run-time error * Fix duplicate data * Fix column title (height -> high) of data frame in quoteFXTsData function Modified: head/finance/R-cran-RFinanceYJ/Makefile head/finance/R-cran-RFinanceYJ/distinfo head/finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R Modified: head/finance/R-cran-RFinanceYJ/Makefile ============================================================================== --- head/finance/R-cran-RFinanceYJ/Makefile Thu Jun 27 13:48:43 2013 (r321893) +++ head/finance/R-cran-RFinanceYJ/Makefile Thu Jun 27 15:00:45 2013 (r321894) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= RFinanceYJ -PORTVERSION= 0.1.6 -PORTREVISION= 10 +PORTVERSION= 0.2.0 CATEGORIES= finance DISTNAME= ${PORTNAME}_${PORTVERSION} Modified: head/finance/R-cran-RFinanceYJ/distinfo ============================================================================== --- head/finance/R-cran-RFinanceYJ/distinfo Thu Jun 27 13:48:43 2013 (r321893) +++ head/finance/R-cran-RFinanceYJ/distinfo Thu Jun 27 15:00:45 2013 (r321894) @@ -1,2 +1,2 @@ -SHA256 (RFinanceYJ_0.1.6.tar.gz) = 6d2629d1ac4ab5b4f5b55307ce679ffeb58cb68595c1d1758ae8eb8d4d523c41 -SIZE (RFinanceYJ_0.1.6.tar.gz) = 3140 +SHA256 (RFinanceYJ_0.2.0.tar.gz) = f76227c3dcbae911d888214bd2a445908433187164f543c1ec2221d4f9051d28 +SIZE (RFinanceYJ_0.2.0.tar.gz) = 3625 Modified: head/finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R ============================================================================== --- head/finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R Thu Jun 27 13:48:43 2013 (r321893) +++ head/finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R Thu Jun 27 15:00:45 2013 (r321894) @@ -1,11 +1,35 @@ ---- 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) ){ +--- R/quoteStockTsData.R.orig 2013-06-08 14:23:35.000000000 +0900 ++++ R/quoteStockTsData.R 2013-06-27 20:47:46.000000000 +0900 +@@ -38,7 +38,7 @@ + h <- as.number(xmlValue(quote.table.item[[3]])) + l <- as.number(xmlValue(quote.table.item[[4]])) + c <- as.number(xmlValue(quote.table.item[[5]])) +- return(data.frame(date=d,open=o,height=h,low=l,close=c)) ++ return(data.frame(date=d,open=o,high=h,low=l,close=c)) + } + return(quoteTsData(x,function.fx,since,start.num,date.end,time.interval,type="fx")) + } +@@ -66,6 +66,7 @@ + } + + while( result.num >= 51 ){ ++ start.num <- start.num + 1 + quote.table <- NULL + quote.url <- paste('http://info.finance.yahoo.co.jp/history/?code=',x,start,end,'&p=',start.num,'&tm=',substr(time.interval,1,1),sep="") + +@@ -90,7 +91,6 @@ + } + + result.num <- xmlSize(quote.table) +- start.num <- start.num + 1 + Sys.sleep(1) + } + financial.data <- financial.data[order(financial.data$date),] +@@ -99,7 +99,6 @@ + #convert string formart date to POSIXct object + convertToDate <- function(date.string,time.interval) + { +- date.string <- iconv(date.string,"EUC-JP","UTF-8","") + #data format is different between monthly and dialy or weekly + if(any(time.interval==c('d','w'))){ + result <- gsub("^([0-9]{4})([^0-9]+)([0-9]{1,2})([^0-9]+)([0-9]{1,2})([^0-9]+)","\\1-\\3-\\5",date.string)