From b1c34cb862146b48344e0174db62916f62d4a2c0 Mon Sep 17 00:00:00 2001 From: "Logan C. Brooks" Date: Thu, 5 Oct 2023 07:48:40 -0700 Subject: [PATCH] Speed up cdc baseline: `quantile(...., names = FALSE)` --- R/layer_cdc_flatline_quantiles.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/layer_cdc_flatline_quantiles.R b/R/layer_cdc_flatline_quantiles.R index d9d192563..312c3630e 100644 --- a/R/layer_cdc_flatline_quantiles.R +++ b/R/layer_cdc_flatline_quantiles.R @@ -245,7 +245,8 @@ propagate_samples <- function( if (symmetrize) { r <- c(r, -r) } - samp <- quantile(r, probs = c(0, seq_len(nsim - 1)) / (nsim - 1), na.rm = TRUE) + samp <- quantile(r, probs = c(0, seq_len(nsim - 1)) / (nsim - 1), + na.rm = TRUE, names = FALSE) res <- list() raw <- samp + p