From 0905ba47cb8050a80a548366e5eb971b3a0dadfb Mon Sep 17 00:00:00 2001 From: "Logan C. Brooks" Date: Wed, 4 Oct 2023 16:52:40 -0700 Subject: [PATCH 1/3] "Logical" -> "Scalar logical" as appropriate to match rest of docs --- R/layer_cdc_flatline_quantiles.R | 4 ++-- man/layer_cdc_flatline_quantiles.Rd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/layer_cdc_flatline_quantiles.R b/R/layer_cdc_flatline_quantiles.R index 16538f0e1..d9d192563 100644 --- a/R/layer_cdc_flatline_quantiles.R +++ b/R/layer_cdc_flatline_quantiles.R @@ -32,7 +32,7 @@ #' These samples are spaced evenly on the (0, 1) scale, F_X(x) resulting in #' linear interpolation on the X scale. This is achieved with #' [stats::quantile()] Type 7 (the default for that function). -#' @param symmetrize Logical. If `TRUE`, does two things: (i) forces the +#' @param symmetrize Scalar logical. If `TRUE`, does two things: (i) forces the #' "empirical" CDF of residuals to be symmetric by pretending that for every #' actually-observed residual X we also observed another residual -X, and (ii) #' at each ahead, forces the median simulated value to be equal to the point @@ -41,7 +41,7 @@ #' simulating the next ahead. This forces any 1-ahead predictive intervals to #' be symmetric about the point prediction, and encourages larger aheads to be #' more symmetric. -#' @param nonneg Logical. Force all predictive intervals be non-negative. +#' @param nonneg Scalar logical. Force all predictive intervals be non-negative. #' Because non-negativity is forced _before_ propagating forward, this has #' slightly different behaviour than would occur if using [layer_threshold()]. #' Thresholding at each ahead takes place after any shifting from diff --git a/man/layer_cdc_flatline_quantiles.Rd b/man/layer_cdc_flatline_quantiles.Rd index 5e72378b3..55a1a378e 100644 --- a/man/layer_cdc_flatline_quantiles.Rd +++ b/man/layer_cdc_flatline_quantiles.Rd @@ -39,7 +39,7 @@ linear interpolation on the X scale. This is achieved with \item{by_key}{A character vector of keys to group the residuals by before calculating quantiles. The default, \code{c()} performs no grouping.} -\item{symmetrize}{Logical. If \code{TRUE}, does two things: (i) forces the +\item{symmetrize}{Scalar logical. If \code{TRUE}, does two things: (i) forces the "empirical" CDF of residuals to be symmetric by pretending that for every actually-observed residual X we also observed another residual -X, and (ii) at each ahead, forces the median simulated value to be equal to the point @@ -49,7 +49,7 @@ simulating the next ahead. This forces any 1-ahead predictive intervals to be symmetric about the point prediction, and encourages larger aheads to be more symmetric.} -\item{nonneg}{Logical. Force all predictive intervals be non-negative. +\item{nonneg}{Scalar logical. Force all predictive intervals be non-negative. Because non-negativity is forced \emph{before} propagating forward, this has slightly different behaviour than would occur if using \code{\link[=layer_threshold]{layer_threshold()}}. Thresholding at each ahead takes place after any shifting from From b1c34cb862146b48344e0174db62916f62d4a2c0 Mon Sep 17 00:00:00 2001 From: "Logan C. Brooks" Date: Thu, 5 Oct 2023 07:48:40 -0700 Subject: [PATCH 2/3] 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 From cf9a44e3fb3cd2a08342272787882b3626e5ff91 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Thu, 5 Oct 2023 11:57:19 -0700 Subject: [PATCH 3/3] CI: trying to change in a particular branch too --- .github/workflows/R-CMD-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index c4bcd6b68..eff7367ec 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -4,9 +4,9 @@ # Created with usethis + edited to use API key. on: push: - branches: [main, master] + branches: [main, master, v0.0.6] pull_request: - branches: [main, master] + branches: [main, master, v0.0.6] name: R-CMD-check