From 5495432695518b11301b408bfcfb9529d569e446 Mon Sep 17 00:00:00 2001 From: nikosbosse Date: Wed, 29 Nov 2023 11:25:58 +0100 Subject: [PATCH] change threads for data.table from 1 to 2 --- R/avail_forecasts.R | 2 +- man/avail_forecasts.Rd | 2 +- tests/testthat/setup.R | 2 +- vignettes/scoringutils.Rmd | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/R/avail_forecasts.R b/R/avail_forecasts.R index 7f183e2aa..19a175b03 100644 --- a/R/avail_forecasts.R +++ b/R/avail_forecasts.R @@ -27,7 +27,7 @@ #' @export #' @keywords check-forecasts #' @examples -#' data.table::setDTthreads(1) # only needed to avoid issues on CRAN +#' \dontshow{data.table::setDTthreads(2) # only needed to avoid issues on CRAN} #' #' avail_forecasts(example_quantile, #' collapse = c("quantile"), diff --git a/man/avail_forecasts.Rd b/man/avail_forecasts.Rd index 5eef64b30..d8bf8afa9 100644 --- a/man/avail_forecasts.Rd +++ b/man/avail_forecasts.Rd @@ -57,7 +57,7 @@ number of forecasts per model and location). This is useful to determine whether there are any missing forecasts. } \examples{ -data.table::setDTthreads(1) # only needed to avoid issues on CRAN +\dontshow{data.table::setDTthreads(2) # only needed to avoid issues on CRAN} avail_forecasts(example_quantile, collapse = c("quantile"), diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 37aff0af0..b1bf295e3 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -1,7 +1,7 @@ # load common required test packages library(ggplot2, quietly = TRUE) suppressMessages(library(magrittr)) -data.table::setDTthreads(1) # only needed to avoid issues on CRAN +data.table::setDTthreads(2) # only needed to avoid issues on CRAN # compute quantile scores scores <- suppressMessages(score(example_quantile)) diff --git a/vignettes/scoringutils.Rmd b/vignettes/scoringutils.Rmd index 10061aed2..3d6390afd 100644 --- a/vignettes/scoringutils.Rmd +++ b/vignettes/scoringutils.Rmd @@ -19,7 +19,7 @@ library(magrittr) library(data.table) library(ggplot2) library(knitr) -data.table::setDTthreads(1) # only needed to avoid issues on CRAN +data.table::setDTthreads(2) # only needed to avoid issues on CRAN ``` The `scoringutils` package provides a collection of metrics and proper scoring rules that make it simple to score probabilistic forecasts against the true observed values. You can find more information in the paper [Evaluating Forecasts with scoringutils in R](https://arxiv.org/abs/2205.07090) as well as the [Metrics-Vignette](https://epiforecasts.io/scoringutils/articles/metric-details.html) and the [Scoring forecasts directly Vignette](https://epiforecasts.io/scoringutils/articles/scoring-forecasts-directly.html). @@ -36,7 +36,7 @@ Most of the time, the `score()` function will be able to do the entire evaluatio ```{r, echo=FALSE} requirements <- data.table( - "Format" = c( + Format = c( "quantile-based", "sample-based", "binary", "pairwise-comparisons" ), `Required columns` = c(