diff --git a/DESCRIPTION b/DESCRIPTION index 9624137..4f0ceb5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -4,7 +4,9 @@ Title: Seasonal Adjustment of High Frequency Data with 'JDemetra+ 3.x' Version: 2.1.1 Authors@R: c( person("Jean", "Palate", role = c("aut", "cre"), - email = "palatejean@gmail.com")) + email = "palatejean@gmail.com"), + person("Tanguy", "Barthelemy", role = c("ctb", "art"), + email ="tanguy.barthelemy@insee.fr")) Description: R Interface to 'JDemetra+ 3.x' () time series analysis software. It provides functions for seasonal adjustment of high-frequency data displaying multiple, non integer periodicities. Pre-adjustment with extended airline model and Arima Model Based decomposition. Depends: R (>= 4.1.0) diff --git a/NEWS.md b/NEWS.md index 9574aa9..4b32ec4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,20 +7,28 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed + +* Update .jar files added (related to [v2.2.0](https://github.com/jdemetra/jdplus-incubator/releases/tag/v2.2.0)) + + +## [2.1.0] - 2024-04-18 + ### Added -- New plots for `JDFractionalAirlineDecomposition` and `JDFractionalAirlineEstimation` -- Add documentation for plots and prints -- low-level functions for extended airline models (log/level, outliers, estimation) +* New plots for `JDFractionalAirlineDecomposition` and `JDFractionalAirlineEstimation` +* Add documentation for plots and prints +* low-level functions for extended airline models (log/level, outliers, estimation) ### Changed -- Update readme -- Update prints +* Update readme +* Update prints ## [2.0.0] - 2023-12-12 -[Unreleased]: https://github.com/rjdverse/rjd3highfreq/compare/v2.0.0...HEAD +[Unreleased]: https://github.com/rjdverse/rjd3highfreq/compare/v2.1.0...HEAD +[2.1.0]: https://github.com/rjdverse/rjd3highfreq/compare/v2.0.0...v2.1.0 [2.0.0]: https://github.com/rjdverse/rjd3highfreq/releases/tag/v2.0.0 diff --git a/R/jd3_extendedairline.R b/R/jd3_extendedairline.R index 4bcb54a..64f9869 100644 --- a/R/jd3_extendedairline.R +++ b/R/jd3_extendedairline.R @@ -15,8 +15,8 @@ NULL .extendedairline_spec<-function(periodicities, differencing=-1, ar=FALSE, toint=FALSE){ if (differencing == -1){ - differencing = length(periodicities) - if (! ar) differencing=differencing + 1 + differencing <- length(periodicities) + if (! ar) differencing<-differencing + 1 } @@ -96,12 +96,10 @@ NULL #' #' @examples .extended_airline_outliers<-function(jregarima, jspec, types=c("ao"), start=0, end=0, critical_value=0, max_outliers=30, max_round=30){ - if (start != 0) start=start-1 - if (end != 0) end=end-1 + if (start != 0) start<-start-1 + if (end != 0) end<-end-1 rslt <- .jcall("jdplus/highfreq/base/r/ExtendedAirlineProcessor", "Ljdplus/toolkit/base/api/math/matrices/Matrix;", "outliers", jregarima, jspec, .jarray(types), as.integer(start), as.integer(end), as.numeric(critical_value), as.integer(max_outliers), as.integer(max_round) ) return(rjd3toolkit::.jd2r_matrix(rslt)+1) } - - diff --git a/R/jd3_fractionalairline.R b/R/jd3_fractionalairline.R index eabedb6..be5ad39 100644 --- a/R/jd3_fractionalairline.R +++ b/R/jd3_fractionalairline.R @@ -142,7 +142,7 @@ fractionalAirlineEstimation <- function(y, y_time = NULL) { # Input checks - mean = FALSE + mean <- FALSE checkmate::assertNumeric(y, null.ok = FALSE) checkmate::assertNumeric(criticalValue, len = 1, null.ok = FALSE) checkmate::assertNumeric(precision, len = 1, null.ok = FALSE) @@ -246,11 +246,11 @@ fractionalAirlineEstimation <- function(y, if (nO > 0) { regvar_outliers<-rep(NA,nX-nO) for(j in 1:nX-nO) { - regvar_outliers[j]=paste("x-", j)} + regvar_outliers[j] <- paste("x-", j)} for (j in 1:nO) { - regvar_outliers[nX-nO+j]<-o[[j]]$toString()} + regvar_outliers[nX-nO+j] <- o[[j]]$toString()} return(regvar_outliers) - }else{ + } else { return(list()) } } diff --git a/README.Rmd b/README.Rmd index 404c465..7fa42f3 100644 --- a/README.Rmd +++ b/README.Rmd @@ -34,10 +34,32 @@ rjd3highfreq provides functions for seasonal adjustment of high-frequency data d Running rjd3 packages requires **Java 17 or higher**. How to set up such a configuration in R is explained [here](https://jdemetra-new-documentation.netlify.app/#Rconfig) + +### Latest release + +To get the current stable version (from the latest release): + +- From GitHub: + +```{r, echo = TRUE, eval = FALSE} +# install.packages("remotes") +remotes::install_github("rjdverse/rjd3toolkit@*release") +remotes::install_github("rjdverse/rjd3sts@*release") +remotes::install_github("rjdverse/rjd3highfreq@*release") +``` + +- From [r-universe](https://rjdverse.r-universe.dev/rjd3highfreq): + +```{r, echo = TRUE, eval = FALSE} +install.packages("rjd3highfreq", repos = c("https://rjdverse.r-universe.dev", "https://cloud.r-project.org")) +``` + + +### Development version + You can install the development version of **rjd3highfreq** from [GitHub](https://github.com/) with: -```{r, eval = FALSE} -# Install development version from GitHub +```{r, echo = TRUE, eval = FALSE} # install.packages("remotes") remotes::install_github("rjdverse/rjd3highfreq") ``` diff --git a/README.md b/README.md index 0517612..8c6153f 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,31 @@ Running rjd3 packages requires **Java 17 or higher**. How to set up such a configuration in R is explained [here](https://jdemetra-new-documentation.netlify.app/#Rconfig) +### Latest release + +To get the current stable version (from the latest release): + +- From GitHub: + +``` r +# install.packages("remotes") +remotes::install_github("rjdverse/rjd3toolkit@*release") +remotes::install_github("rjdverse/rjd3sts@*release") +remotes::install_github("rjdverse/rjd3highfreq@*release") +``` + +- From [r-universe](https://rjdverse.r-universe.dev/rjd3highfreq): + +``` r +install.packages("rjd3highfreq", repos = c("https://rjdverse.r-universe.dev", "https://cloud.r-project.org")) +``` + +### Development version + You can install the development version of **rjd3highfreq** from [GitHub](https://github.com/) with: ``` r -# Install development version from GitHub # install.packages("remotes") remotes::install_github("rjdverse/rjd3highfreq") ``` diff --git a/inst/java/jdplus-highfreq-base-api-2.1.1-SNAPSHOT.jar b/inst/java/jdplus-highfreq-base-api-2.2.0.jar similarity index 84% rename from inst/java/jdplus-highfreq-base-api-2.1.1-SNAPSHOT.jar rename to inst/java/jdplus-highfreq-base-api-2.2.0.jar index 541bef4..b932f07 100644 Binary files a/inst/java/jdplus-highfreq-base-api-2.1.1-SNAPSHOT.jar and b/inst/java/jdplus-highfreq-base-api-2.2.0.jar differ diff --git a/inst/java/jdplus-highfreq-base-core-2.1.1-SNAPSHOT.jar b/inst/java/jdplus-highfreq-base-core-2.2.0.jar similarity index 92% rename from inst/java/jdplus-highfreq-base-core-2.1.1-SNAPSHOT.jar rename to inst/java/jdplus-highfreq-base-core-2.2.0.jar index 4853683..f7d4b48 100644 Binary files a/inst/java/jdplus-highfreq-base-core-2.1.1-SNAPSHOT.jar and b/inst/java/jdplus-highfreq-base-core-2.2.0.jar differ diff --git a/inst/java/jdplus-highfreq-base-r-2.1.1-SNAPSHOT.jar b/inst/java/jdplus-highfreq-base-r-2.2.0.jar similarity index 70% rename from inst/java/jdplus-highfreq-base-r-2.1.1-SNAPSHOT.jar rename to inst/java/jdplus-highfreq-base-r-2.2.0.jar index 1645d77..147da31 100644 Binary files a/inst/java/jdplus-highfreq-base-r-2.1.1-SNAPSHOT.jar and b/inst/java/jdplus-highfreq-base-r-2.2.0.jar differ diff --git a/man/fractionalAirlineEstimation.Rd b/man/fractionalAirlineEstimation.Rd index 4060434..d670048 100644 --- a/man/fractionalAirlineEstimation.Rd +++ b/man/fractionalAirlineEstimation.Rd @@ -10,7 +10,6 @@ fractionalAirlineEstimation( x = NULL, ndiff = 2, ar = FALSE, - mean = FALSE, outliers = NULL, criticalValue = 6, precision = 1e-12, @@ -27,8 +26,6 @@ fractionalAirlineEstimation( \item{x}{matrix of user-defined regression variables (see rjd3toolkit for building calendar regressors).} -\item{mean}{add constant mean to y after differencing.} - \item{outliers}{type of outliers sub vector of c("AO","LS","WO")} \item{criticalValue}{Critical value for automatic outlier detection} diff --git a/pom.xml b/pom.xml index f20e099..8652aa6 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ Usage: mvn -Pcopy-jars - 2.1.1-SNAPSHOT + 2.2.0