From 3694e48df38b5ba927bde457445ac41df2e897bb Mon Sep 17 00:00:00 2001 From: nikosbosse Date: Mon, 20 Nov 2023 13:48:09 +0100 Subject: [PATCH] Make documentation for `apply_metrics` more consistent --- R/score.R | 14 +++++++------- man/apply_metrics.Rd | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/R/score.R b/R/score.R index 1ca0e67db..668868dd3 100644 --- a/R/score.R +++ b/R/score.R @@ -261,13 +261,13 @@ score.scoringutils_quantile <- function(data, metrics = metrics_quantile, ...) { } -#' Helper Function To Apply a List Of Functions To a Data Table of Forecasts -#' @description The function applies a list of functions to a data table of -#' forecasts. The function is used within `score()` to apply all -#' scoring rules to the data. -#' Function calls are wrapped in `run_safely()` to catch errors and to make -#' sure that only arguments are passed to the function that are actually -#' accepted by the function. +#' @title Apply A List Of Functions To A Data Table Of Forecasts +#' @description This helper function applies scoring rules (stored as a list of +#' functions) to a data table of. `apply_metrics` is used within `score()` to +#' apply all scoring rules to the data. +#' Scoring rules are wrapped in [run_safely()] to catch errors and to make +#' sure that only arguments are passed to the scoring rule that are actually +#' accepted by it. #' @inheritParams score #' @return A data table with the forecasts and the calculated metrics apply_metrics <- function(data, metrics, ...) { diff --git a/man/apply_metrics.Rd b/man/apply_metrics.Rd index affaaab99..4586b40b9 100644 --- a/man/apply_metrics.Rd +++ b/man/apply_metrics.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/score.R \name{apply_metrics} \alias{apply_metrics} -\title{Helper Function To Apply a List Of Functions To a Data Table of Forecasts} +\title{Apply A List Of Functions To A Data Table Of Forecasts} \usage{ apply_metrics(data, metrics, ...) } @@ -20,10 +20,10 @@ default metrics used.} A data table with the forecasts and the calculated metrics } \description{ -The function applies a list of functions to a data table of -forecasts. The function is used within \code{score()} to apply all -scoring rules to the data. -Function calls are wrapped in \code{run_safely()} to catch errors and to make -sure that only arguments are passed to the function that are actually -accepted by the function. +This helper function applies scoring rules (stored as a list of +functions) to a data table of. \code{apply_metrics} is used within \code{score()} to +apply all scoring rules to the data. +Scoring rules are wrapped in \code{\link[=run_safely]{run_safely()}} to catch errors and to make +sure that only arguments are passed to the scoring rule that are actually +accepted by it. }