From 6d67f9d461bfffe7c6037aec774d220758415854 Mon Sep 17 00:00:00 2001 From: Sebastian Funk Date: Tue, 24 Aug 2021 15:11:52 +0200 Subject: [PATCH 1/2] visible return in `range_wide_to_long` --- R/utils_data_handling.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils_data_handling.R b/R/utils_data_handling.R index 68b8e5cdb..032c090e4 100644 --- a/R/utils_data_handling.R +++ b/R/utils_data_handling.R @@ -106,7 +106,7 @@ range_wide_to_long <- function(data) { data[, range := as.numeric(gsub("^.*?_","", range))] } - return(data) + return(data[]) } From 4002705c5fc20dd906abd4afbc8fe73ab2248569 Mon Sep 17 00:00:00 2001 From: Sebastian Funk Date: Tue, 24 Aug 2021 15:19:50 +0200 Subject: [PATCH 2/2] visible return in `eval_forecasts` --- R/eval_forecasts_binary.R | 2 ++ R/eval_forecasts_continuous_integer.R | 2 +- R/eval_forecasts_helper.R | 4 ++-- R/eval_forecasts_quantile.R | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/R/eval_forecasts_binary.R b/R/eval_forecasts_binary.R index 9b94d6bb0..93d7cb21b 100644 --- a/R/eval_forecasts_binary.R +++ b/R/eval_forecasts_binary.R @@ -45,6 +45,8 @@ eval_forecasts_binary <- function(data, by = summarise_by] } + + return(res[]) } diff --git a/R/eval_forecasts_continuous_integer.R b/R/eval_forecasts_continuous_integer.R index 34ada6c5a..82e130e12 100644 --- a/R/eval_forecasts_continuous_integer.R +++ b/R/eval_forecasts_continuous_integer.R @@ -169,5 +169,5 @@ eval_forecasts_sample <- function(data, pit_plots = pit_histograms) } - return(res) + return(res[]) } diff --git a/R/eval_forecasts_helper.R b/R/eval_forecasts_helper.R index f66bf6b4a..40088b0e0 100644 --- a/R/eval_forecasts_helper.R +++ b/R/eval_forecasts_helper.R @@ -20,7 +20,7 @@ add_quantiles <- function(dt, varnames, quantiles, by) { na.rm = TRUE)), by = c(by)] } - return(dt) + return(dt[]) } @@ -41,5 +41,5 @@ add_sd <- function(dt, varnames, by) { for (varname in varnames) { dt[, paste0(varname, "_sd") := sd(get(varname), na.rm = TRUE), by = by] } - return(dt) + return(dt[]) } diff --git a/R/eval_forecasts_quantile.R b/R/eval_forecasts_quantile.R index 745aff1e1..036b97ea1 100644 --- a/R/eval_forecasts_quantile.R +++ b/R/eval_forecasts_quantile.R @@ -194,5 +194,5 @@ eval_forecasts_quantile <- function(data, res[, c("quantile_coverage") := NULL] } - return(res) + return(res[]) }