Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 486: Fix NOTEs for CRAN submission #514

Merged
merged 6 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
^\.devcontainer$
^CODE_OF_CONDUCT\.md$
^inst/manuscript/output$
^CRAN-SUBMISSION$
2 changes: 1 addition & 1 deletion R/avail_forecasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -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}
nikosbosse marked this conversation as resolved.
Show resolved Hide resolved
#'
#' avail_forecasts(example_quantile,
#' collapse = c("quantile"),
Expand Down
1 change: 1 addition & 0 deletions R/summarise_scores.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ check_summary_params <- function(scores,
#' summary is present according to the value specified in `by`.
#' @examples
#' library(magrittr) # pipe operator
#' data.table::setDTthreads(1) # only needed to avoid issues on CRAN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not using the same core count and dontshow everywhere?

#' score(example_quantile) %>%
#' add_coverage(by = c("model", "target_type")) %>%
#' summarise_scores(by = c("model", "target_type")) %>%
Expand Down
1 change: 1 addition & 0 deletions man/add_coverage.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/avail_forecasts.Rd

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

3 changes: 2 additions & 1 deletion tests/testthat/setup.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# load common required test packages
library(ggplot2, quietly = TRUE)
suppressMessages(library(magrittr))
data.table::setDTthreads(2) # only needed to avoid issues on CRAN

# compute quantile scores
scores <- suppressMessages(score(example_quantile))
scores <- suppressMessages(score(example_quantile))
3 changes: 2 additions & 1 deletion vignettes/scoringutils.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ library(magrittr)
library(data.table)
library(ggplot2)
library(knitr)
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).
Expand All @@ -35,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(
Expand Down
Loading