new_scores: Construct an object of class 'scores'

View source: R/class-scores.R

new_scoresR Documentation

Construct an object of class scores

Description

This function creates an object of class scores based on a data.table or similar.

Usage

new_scores(scores, metrics, ...)

Arguments

scores

A data.table or similar with scores as produced by score().

metrics

A character vector with the names of the scores (i.e. the names of the scoring rules used for scoring).

...

Additional arguments to data.table::as.data.table()

Value

An object of class scores

Examples

## Not run: 
df <- data.frame(
  model = "A",
  wis = "0.1"
)
new_scores(df, "wis")

## End(Not run)

epiforecasts/scoringutils documentation built on Dec. 11, 2024, 11:12 a.m.