Skip to content

Commit

Permalink
Linting of some functions
Browse files Browse the repository at this point in the history
  • Loading branch information
palatej committed Oct 28, 2024
1 parent 16c83b6 commit 2880cfe
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
19 changes: 13 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,27 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [3.3.0] - 2024-10-28

### Changed

- New java libraries

## [3.2.3] - 2024-07-12

### Changed

* New .jar (related to release [3.2.4](https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.4))
* Some linting of R functions
- New .jar (related to release)
- Some linting of R functions

## [3.2.2] - 2024-03-15

[Unreleased]: https://github.com/rjdverse/rjd3x13/compare/v3.2.3...HEAD

[Unreleased]: https://github.com/rjdverse/rjd3x13/compare/v3.3.0...HEAD
[3.3.0]: https://github.com/rjdverse/rjd3x13/releases/tag/v3.2.3...v3.3.0
[3.2.3]: https://github.com/rjdverse/rjd3x13/releases/tag/v3.2.2...v3.2.3
[3.2.2]: https://github.com/rjdverse/rjd3x13/releases/tag/v3.2.2

6 changes: 3 additions & 3 deletions R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,7 @@ print.JD3_X13_SPEC <- function(x, ...) {

cat("\n", "Benchmarking", "\n", sep = "")

if (!x$benchmarking$enabled) {
cat("Is enabled: No\n")
} else {
if (x$benchmarking$enabled) {
cat("Enabled: Yes\n", sep = "")
cat("Target: ", x$benchmarking$target,
ifelse(
Expand All @@ -411,6 +409,8 @@ print.JD3_X13_SPEC <- function(x, ...) {
cat("Use forecast: ",
ifelse(test = x$benchmarking$forecast, yes = "Yes", no = "No (Auto)"),
"\n", sep = "")
} else {
cat("Is enabled: No\n")
}

return(invisible(x))
Expand Down
6 changes: 3 additions & 3 deletions R/set_x11_spec.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ set_x11.JD3_X11_SPEC <- function(
x$excludefcasts <- exclude.forecast
}
if (!anyNA(sigma.vector)) {
if (!all(sigma.vector %in% c(1, 2))) {
warning("sigma.vector must be equal to 1 or 2")
} else {
if (all(sigma.vector %in% c(1, 2))) {
x$sigma <- "SELECT"
x$vsigmas <- as.integer(sigma.vector)
} else {
warning("sigma.vector must be equal to 1 or 2")
}
}
if (!is.na(bias)) {
Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
options(summary_info = TRUE)
}
if (is.null(getOption("thresholds_pval"))) {
options(thresholds_pval = c("Severe" = 0.001, "Bad" = 0.01, "Uncertain" = 0.05, "Good" = Inf))
options(thresholds_pval = c(Severe = 0.001, Bad = 0.01, Uncertain = 0.05, Good = Inf))
}
}

0 comments on commit 2880cfe

Please sign in to comment.