Commit be1d1de4 authored by Dirk Eddelbuettel's avatar Dirk Eddelbuettel

Import Upstream version 0.10-28

parent 7177c1e5
2012-02-20 Kurt Hornik <Kurt.Hornik@wu.ac.at>
* DESCRIPTION (Version): New version is 0.10-28.
* man/get.hist.quote.Rd: Make example more robust re availability
of web services.
2011-10-23 Kurt Hornik <Kurt.Hornik@wu.ac.at>
* DESCRIPTION (Version): New version is 0.10-27.
......
Package: tseries
Version: 0.10-27
Date: 2011-10-23
Version: 0.10-28
Date: 2012-02-20
Title: Time series analysis and computational finance
Author: Compiled by Adrian Trapletti <adrian@trapletti.org>
Maintainer: Kurt Hornik <Kurt.Hornik@R-project.org>
......@@ -9,6 +9,6 @@ Depends: R (>= 2.10.0), quadprog, stats, zoo
Suggests: its
Imports: graphics, stats, utils
License: GPL-2
Packaged: 2011-10-23 19:49:21 UTC; hornik
Packaged: 2012-02-21 10:09:29 UTC; hornik
Repository: CRAN
Date/Publication: 2011-10-23 19:54:51
Date/Publication: 2012-02-21 10:23:38
efaa0309b8c524ece76bf6ee94877d79 *ChangeLog
6766d0f81bc7867b0ed9f2e4403c7ba4 *DESCRIPTION
0f5035abc165191a91eec1cd4b80b295 *ChangeLog
31354e220ae43db94ded475431249fcb *DESCRIPTION
cc6f568593cc497e287a13877445f660 *NAMESPACE
434cfb7f2cdc1fe1cab1922e3fb0e3d8 *R/arma.R
14f9afd0d2076afdd8bb8ef28a729884 *R/finance.R
d6e08bdc7e3ddc6f870cfcd657f364bf *R/finance.R
f3d8df961e5a15c7e356a4566424e175 *R/garch.R
decf4a3134c069cf9d2dbc79b1b60706 *R/irts.R
983c115f3a9894fd4eab6b8892a8171a *R/test.R
ebc29d93799680f40e284960a8cd6950 *R/tsutils.R
6474314852bc0951b0cc3848febd98dc *R/zzz.R
a438e352affac23cc870d81b8fc5d22f *README
b8dc6a96426cbcc2c6de37e2089437f7 *data/NelPlo.rda
86456f5e5c936da600504739c492ccfb *data/USeconomic.rda
f1876d6ab28e98a21bef65fb4b58a2e0 *data/bev.rda
240476afb739ac510a7ac341f24803f5 *data/camp.rda
5b61bc2399d886d53c3a24146818051e *data/ice.river.rda
ded48c6071cc23510e80d7d4ef8d34e2 *data/nino.rda
752690dc135311d65f6b70b7a72a1d99 *data/tcm.rda
cb057608440955060c75c0baf0e0a753 *data/tcmd.rda
2daf9469d56d15f6a897b40150b1b595 *data/NelPlo.rda
3d55de54923ae3b4917ef68e1f7f20ec *data/USeconomic.rda
a5e63983ee1e714f9edd70b4dafc678b *data/bev.rda
43da0561fe32fdc1862bcba08a39dc0c *data/camp.rda
5d23a2a2dd0e9a0af45fcd9fbd4ab0bb *data/ice.river.rda
68118fd3bd3768dfbab49d4b157f6499 *data/nino.rda
d9e14b16bfef766239b084abc2cda03c *data/tcm.rda
ef515687df31a515c5278d9320f64207 *data/tcmd.rda
ee522e5be7a4a8f15d449a342342c1f2 *inst/CITATION
39c832867f0093af08dba56ed7c89504 *man/NelPlo.Rd
a3fd00105442c79dbe9d8097b5877f40 *man/USeconomic.Rd
......@@ -28,7 +28,7 @@ af95a59d763942cc81ad5d3f60a8394c *man/bds.test.Rd
89173da2154e0d28b27bd2e9d00c983b *man/camp.Rd
35c28a6707e4e01f789be2117c646664 *man/garch-methods.Rd
6e9e94d717f01d4208a8fa29e0ea28d2 *man/garch.Rd
20526a77a6a7ca4db3f1b73c36cb901d *man/get.hist.quote.Rd
fc3a61f814ef8944b9335975a636d067 *man/get.hist.quote.Rd
d78ea694dcc885f7a4df3e89efff2788 *man/ice.river.Rd
d1b8f7e9d68bae68eea050d9efedb11b *man/irts-functions.Rd
82628e1b908072d5572db16d8d4fd2fa *man/irts-methods.Rd
......
......@@ -156,7 +156,9 @@ function (instrument = "^gdax", start, end,
end <- as.Date(end)
if(is.null(method)) {
method <- ifelse(!is.null(getOption("download.file.method")), getOption("download.file.method"), "auto")
method <- getOption("download.file.method")
if(is.null(method))
method <- "auto"
}
if(provider == "yahoo") {
......@@ -178,11 +180,28 @@ function (instrument = "^gdax", start, end,
"&x=.csv",
sep = "")
destfile <- tempfile()
status <- download.file(url, destfile, method = method, quiet = quiet)
if(status != 0) {
unlink(destfile)
stop(paste("download error, status", status))
## Try downloading several times.
## Could make this controllable ...
i <- 1L
repeat {
status <- tryCatch(download.file(url, destfile,
method = method,
quiet = quiet),
error = identity)
if(!inherits(status, "error") && (status == 0))
break
unlink(destfile)
if(i >= 5L) {
if(inherits(status, "error"))
stop(conditionMessage(status))
else
stop(sprintf("download error, status %d", status))
}
message("download error, retrying ...")
i <- i + 1L
}
nlines <- length(count.fields(destfile, sep = "\n"))
if(nlines == 1) {
unlink(destfile)
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -93,7 +93,11 @@ if(!inherits(try(open(con), silent = TRUE), "try-error")) {
quote = "AdjClose")
x <- merge(spc, ibm)
plot(x, main = "IBM vs S&P 500")
}
con <- url("http://www.oanda.com")
if(!inherits(try(open(con), silent = TRUE), "try-error")) {
close(con)
x <- get.hist.quote(instrument = "EUR/USD", provider = "oanda",
start = Sys.Date() - 500)
plot(x, main = "EUR/USD")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment