Skip to content

Commit

Permalink
Build 1.2.5 CRAN release
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Dec 13, 2021
1 parent d6bfd92 commit e478049
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ichimoku
Type: Package
Title: Visualization and Tools for Ichimoku Kinko Hyo Strategies
Version: 1.2.4.16
Version: 1.2.5
Description: An implementation of 'Ichimoku Kinko Hyo', also commonly known as
'cloud charts'. Static and interactive visualizations with tools for
creating, backtesting and development of quantitative 'ichimoku' strategies.
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ichimoku 1.2.4.16
# ichimoku 1.2.5

#### New features:

Expand Down
29 changes: 21 additions & 8 deletions R/archive.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,27 @@ archive <- function(..., object, file) {
readArchive(file = if (is.symbol(dots2 <- dots[[2L]])) get(dots2, pos = parent.frame()) else dots2)

} else if (dlen == 3L) {
writeArchive(object = get(dots[[2L]], pos = parent.frame()),
file = if ((dots3 <- dots[[3L]]) == "" && interactive()) {
file.choose(new = TRUE)
} else if (is.symbol(dots3)) {
get(dots3, pos = parent.frame())
} else {
dots3
})
if ((dots2 <- dots[[2L]]) == "") {
readArchive(file = if ((dots3 <- dots[[3L]]) == "") {
interactive() || stop("Empty arguments for both 'object' and 'file' passed to archive()",
"\nFor read operations specify 'file' only, write operations both 'object' and 'file'", call. = FALSE)
file.choose()
} else if (is.symbol(dots3)) {
get(dots3, pos = parent.frame())
} else {
dots3
})

} else {
writeArchive(object = if (is.symbol(dots2 <- dots[[2L]])) get(dots2, pos = parent.frame()) else dots2,
file = if ((dots3 <- dots[[3L]]) == "" && interactive()) {
file.choose(new = TRUE)
} else if (is.symbol(dots3)) {
get(dots3, pos = parent.frame())
} else {
dots3
})
}

} else {
stop(dlen - 1L, " arguments passed to archive() which requires 1 or 2",
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Sasaki, H. 佐々木 英信 (1996), *一目均衡表の研究 [ichimoku kinkouhy

'OANDA' and 'fxTrade' are trademarks owned by OANDA Corporation, an entity unaffiliated with the ichimoku package.

Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.2.4, <https://CRAN.R-project.org/package=ichimoku>.
Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.2.5, <https://CRAN.R-project.org/package=ichimoku>.

--

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ no kenkyuu]*. Tokyo, Japan: Toushi Radar.
entity unaffiliated with the ichimoku package.

Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko
Hyo Strategies*. R package version 1.2.4,
Hyo Strategies*. R package version 1.2.5,
<https://CRAN.R-project.org/package=ichimoku>.

Expand Down
2 changes: 1 addition & 1 deletion data-raw/internal_sysdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
row.names = c(NA, -126L)
)

.user_agent <- "r-ichimoku/1.2.4"
.user_agent <- "r-ichimoku/1.2.5"

usethis::use_data(.ichimoku_themes, .oanda_instruments, .user_agent, internal = TRUE, overwrite = TRUE)

4 changes: 4 additions & 0 deletions tests/testthat/test-archive.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ test_that("archive functions ok", {
object <- ichimoku(sample_ohlc_data)
file <- tempfile()
expect_message(archive(object = object, file = file), "Archive written")
expect_message(archive(object, file), "Archive written")
expect_message(restored <- archive(file = file), "Archive read")
expect_message(restored <- archive(, file), "Archive read")
unlink(file)
expect_identical(restored, object)
expect_error(archive(object, object, object), "3 arguments passed")
expect_error(archive(object), "supplied as a string")
expect_error(archive(object, object), "supplied as a string")
expect_error(archive(object = object), "specified without")
expect_error(archive(,), "Empty arguments")
expect_error(archive(), "0 arguments")
file <- tempfile()
save(sample_ohlc_data, file = file)
expect_error(archive(file), "was not created")
Expand Down
2 changes: 1 addition & 1 deletion vignettes/reference.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,6 @@ Optional (enables additional features):

Sasaki, H. 佐々木 英信 (1996), *一目均衡表の研究 [ichimoku kinkouhyou no kenkyuu]*. Tokyo, Japan: Toushi Radar.

Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.2.4, <https://CRAN.R-project.org/package=ichimoku>.
Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.2.5, <https://CRAN.R-project.org/package=ichimoku>.

---
2 changes: 1 addition & 1 deletion vignettes/strategies.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,6 @@ The 'relative' or 'r value' is calculated as res / sd(X) and represents a standa

Sasaki, H. 佐々木 英信 (1996), *一目均衡表の研究 [ichimoku kinkouhyou no kenkyuu]*. Tokyo, Japan: Toushi Radar.

Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.2.4, <https://CRAN.R-project.org/package=ichimoku>.
Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.2.5, <https://CRAN.R-project.org/package=ichimoku>.

---
2 changes: 1 addition & 1 deletion vignettes/utilities.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,6 @@ df_append(data1, data2)

## References

Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.2.4, <https://CRAN.R-project.org/package=ichimoku>.
Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.2.5, <https://CRAN.R-project.org/package=ichimoku>.

---
2 changes: 1 addition & 1 deletion vignettes/xoanda.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,6 @@ Calling `oanda_switch()` will also clear all cached variables.

OANDA fxTrade API developer website: <https://developer.oanda.com/>.

Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.2.4, <https://CRAN.R-project.org/package=ichimoku>.
Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.2.5, <https://CRAN.R-project.org/package=ichimoku>.

---

0 comments on commit e478049

Please sign in to comment.