diff --git a/.Rbuildignore b/.Rbuildignore index 37f909d..34964c1 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,3 +9,4 @@ cran-comments.md RunRStudio ^codecov\.yml$ ^\.github$ +^CRAN-SUBMISSION$ diff --git a/DESCRIPTION b/DESCRIPTION index 251cb26..01013b5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: lazytrade Type: Package Title: Learn Computer and Data Science using Algorithmic Trading -Version: 0.5.2 +Version: 0.5.3 Author: Vladimir Zhbanko Maintainer: Vladimir Zhbanko Description: Provide sets of functions and methods to learn and practice data science using idea of algorithmic trading. @@ -16,7 +16,7 @@ URL: https://vladdsm.github.io/myblog_attempt/topics/lazy%20trading/, https://gi BugReports: https://github.com/vzhomeexperiments/lazytrade/issues Encoding: UTF-8 LazyData: true -RoxygenNote: 7.1.1 +RoxygenNote: 7.1.2 Imports: readr, stringr, @@ -37,5 +37,5 @@ Suggests: magrittr, data.table, bit64 -Depends: R (>= 3.4.0) +Depends: R (>= 3.6.0) Roxygen: list(markdown = TRUE) diff --git a/NEWS.md b/NEWS.md index b868bb7..924e075 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,15 @@ * setup github actions * add fail safe for function input parameters +# lazytrade 0.5.3 + +# Version 0.5.3 + +## Changes + +* removed as.vector from example code to fix error in R-devel builds +* increased min R version to 3.6.0 + # lazytrade 0.5.2 # Version 0.5.2 diff --git a/R/util_profit_factor.R b/R/util_profit_factor.R index e88106b..7d2feb3 100644 --- a/R/util_profit_factor.R +++ b/R/util_profit_factor.R @@ -23,7 +23,7 @@ #' summarise(PnL = sum(X5), #' NumTrades = n(), #' PrFact = util_profit_factor(X5)) %>% -#' select(PrFact) %>% head(1) %>% as.vector() %>% round(3) +#' select(PrFact) %>% head(1) %>% round(3) #' #' util_profit_factor <- function(x){ diff --git a/README.Rmd b/README.Rmd index 947a7f1..3e12e9e 100644 --- a/README.Rmd +++ b/README.Rmd @@ -15,7 +15,7 @@ knitr::opts_chunk$set( # lazytrade -[![codecov](https://codecov.io/gh/vzhomeexperiments/lazytrade/branch/master/graph/badge.svg)](https://codecov.io/gh/vzhomeexperiments/lazytrade) +[![codecov](https://codecov.io/gh/vzhomeexperiments/lazytrade/branch/master/graph/badge.svg)](https://app.codecov.io/gh/vzhomeexperiments/lazytrade) [![CRAN status](https://www.r-pkg.org/badges/version/lazytrade)](https://CRAN.R-project.org/package=lazytrade) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) [![R-CMD-check](https://github.com/vzhomeexperiments/lazytrade/workflows/R-CMD-check/badge.svg)](https://github.com/vzhomeexperiments/lazytrade/actions) @@ -113,7 +113,7 @@ rl_generate_policy(data_trades, states, actions, control) ## Example - generating passwords for trading platforms login -Multiple trading accounts require passwords, package contains function that may easily generate random passwords: +Multiple trading accounts require passwords, package contains function that may easily generate random passwords: ```{r message=FALSE, warning=FALSE} library(lazytrade) diff --git a/README.md b/README.md index eb2eca9..afe35b1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ -[![codecov](https://codecov.io/gh/vzhomeexperiments/lazytrade/branch/master/graph/badge.svg)](https://codecov.io/gh/vzhomeexperiments/lazytrade) +[![codecov](https://codecov.io/gh/vzhomeexperiments/lazytrade/branch/master/graph/badge.svg)](https://app.codecov.io/gh/vzhomeexperiments/lazytrade) [![CRAN status](https://www.r-pkg.org/badges/version/lazytrade)](https://CRAN.R-project.org/package=lazytrade) [![Lifecycle: @@ -159,7 +159,7 @@ library(readr) #generate 8digit password for trading platform util_generate_password(salt = 'random text') #> . -#> 1 8a289ED5 +#> 1 58e23E45 ``` ## Example - generate initialization files for MT4 platform @@ -307,6 +307,9 @@ library(testthat) #> The following object is masked from 'package:dplyr': #> #> matches +#> The following objects are masked from 'package:readr': +#> +#> edition_get, local_edition #> The following objects are masked from 'package:magrittr': #> #> equals, is_less_than, not diff --git a/cran-comments.md b/cran-comments.md index 9f521b6..6114d4c 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,15 +1,13 @@ ## Test environments -* Docker Container, R 4.1.0 (2021-05-18) -- "Camp Pontanezen" -Platform: x86_64-pc-linux-gnu (64-bit) * R-hub builder -Platform: Debian Linux, R-devel, GCC +Platform: Windows Server 2022, R-devel, 64 bit * Winbuilder -* R version 4.1.0 (2021-05-18) -* R Under development (unstable) (2021-06-18 r80528) +* R version 4.1.2 (2021-11-01) +* R Under development (unstable) (2021-12-14 r81376 ucrt) ## R CMD check results Status: OK -R version R 4.1.0 (2021-05-18) +R version 4.1.2 (2021-11-01) -- "Bird Hippie" There were no ERRORs or WARNINGs or NOTEs diff --git a/man/util_profit_factor.Rd b/man/util_profit_factor.Rd index 131994d..bef1eed 100644 --- a/man/util_profit_factor.Rd +++ b/man/util_profit_factor.Rd @@ -28,7 +28,7 @@ profit_factor_data \%>\% summarise(PnL = sum(X5), NumTrades = n(), PrFact = util_profit_factor(X5)) \%>\% - select(PrFact) \%>\% head(1) \%>\% as.vector() \%>\% round(3) + select(PrFact) \%>\% head(1) \%>\% round(3) } diff --git a/tests/testthat/test-util_profit_factor.R b/tests/testthat/test-util_profit_factor.R index ebaf56f..a4e4ff7 100644 --- a/tests/testthat/test-util_profit_factor.R +++ b/tests/testthat/test-util_profit_factor.R @@ -1,3 +1,4 @@ +library(lazytrade) library(testthat) library(magrittr) library(dplyr) @@ -15,7 +16,6 @@ test_that("test value of the calculation", { PrFact = util_profit_factor(X5)) %>% select(PrFact) %>% head(1) %>% - as.vector() %>% round(3) expect_equal(DF_Stats$PrFact, 0.68)