Skip to content

Commit

Permalink
Clean a few minor things (#814)
Browse files Browse the repository at this point in the history
* improve message

* fix typo in docs

* add missing rdname tags to assert_forecast
  • Loading branch information
nikosbosse authored May 20, 2024
1 parent 87adf45 commit 6aceaaa
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion R/documentation-templates.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#' of the data belong together and jointly form a single forecasts. This is
#' easy e.g. for point forecast, where there is one row per forecast. For
#' quantile or sample-based forecasts, however, there are multiple rows that
#' belong to single forecast.
#' belong to a single forecast.
#'
#' The *forecast unit* or *unit of a single forecast* is then described by the
#' combination of columns that uniquely identify a single forecast.
Expand Down
3 changes: 3 additions & 0 deletions R/forecast.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ assert_forecast <- function(


#' @importFrom cli cli_abort
#' @rdname assert_forecast
#' @export
#' @keywords check-forecasts
assert_forecast.default <- function(
Expand All @@ -211,6 +212,7 @@ assert_forecast.default <- function(


#' @export
#' @rdname assert_forecast
#' @importFrom cli cli_abort
#' @keywords check-forecasts
assert_forecast.forecast_binary <- function(
Expand Down Expand Up @@ -247,6 +249,7 @@ assert_forecast.forecast_binary <- function(


#' @export
#' @rdname assert_forecast
#' @importFrom cli cli_abort
#' @keywords check-forecasts
assert_forecast.forecast_point <- function(
Expand Down
2 changes: 1 addition & 1 deletion R/metrics-quantile.R
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ bias_quantile <- function(observed, predicted, quantile_level, na.rm = TRUE) {
#nolint start: keyword_quote_linter
cli_inform(
c(
"i" = "Median not available, computing bias as mean of the two
"i" = "Median not available, interpolating median from the two
innermost quantiles in order to compute bias."
)
)
Expand Down
2 changes: 1 addition & 1 deletion man/as_forecast.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/assert_forecast.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/forecast_types.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_forecast_unit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/score.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-metrics-quantile.R
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ test_that("bias_quantile(): quantile levels must be unique", {
test_that("bias_quantile only produces one message", {
expect_message(
bias_quantile(observed, predicted[, -3], quantile_level[-3]),
"Median not available, computing bias as mean of the two innermost quantiles in order to compute bias."
"Median not available, interpolating median from the two innermost quantiles in order to compute bias."
)
})

Expand Down

0 comments on commit 6aceaaa

Please sign in to comment.