From 98be758231d14e75536a8eadae418b5c9324c4f5 Mon Sep 17 00:00:00 2001 From: jgabry Date: Tue, 15 Nov 2022 16:37:04 -0700 Subject: [PATCH 1/3] Update R-CMD-check.yaml --- .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 0cab5a68..d0c91ef8 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -48,6 +48,6 @@ jobs: - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true - args: c("--ignore-vignettes", "--no-manual", "--as-cran") - build_args: c("--no-build-vignettes") + # args: c("--ignore-vignettes", "--no-manual", "--as-cran") + # build_args: c("--no-build-vignettes") From f12c647f5aaa90e6dade6053576326c5e2113af6 Mon Sep 17 00:00:00 2001 From: jgabry Date: Tue, 15 Nov 2022 17:03:07 -0700 Subject: [PATCH 2/3] Update R-CMD-check.yaml --- .github/workflows/R-CMD-check.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index d0c91ef8..6d14af22 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -43,6 +43,8 @@ jobs: with: extra-packages: | any::rcmdcheck + any::BH + any::RcppEigen needs: check - uses: r-lib/actions/check-r-package@v2 From 56a765ef44bcfad5cb012fd8ab4d0da44ba13658 Mon Sep 17 00:00:00 2001 From: jgabry Date: Tue, 15 Nov 2022 19:45:44 -0700 Subject: [PATCH 3/3] loo2-non-factorized.Rmd: fix backticks --- R/helpers.R | 3 ++- vignettes/loo2-lfo.Rmd | 6 +++--- vignettes/loo2-non-factorized.Rmd | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/R/helpers.R b/R/helpers.R index ef3bdead..e48b9e1c 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -189,7 +189,8 @@ release_questions <- function() { c( "Have you updated references?", "Have you updated inst/CITATION?", - "Have you updated the vignettes?" + "Have you updated the vignettes?", + "Have you tested building the vignettes on GitHub Actions?" ) } # nocov end diff --git a/vignettes/loo2-lfo.Rmd b/vignettes/loo2-lfo.Rmd index 905558e7..23ba7459 100644 --- a/vignettes/loo2-lfo.Rmd +++ b/vignettes/loo2-lfo.Rmd @@ -281,7 +281,7 @@ preds <- cbind( ) ggplot(cbind(df, preds), aes(x = year, y = Estimate)) + - geom_smooth(aes(ymin = Q5, ymax = Q95), stat = "identity", size = 0.5) + + geom_smooth(aes(ymin = Q5, ymax = Q95), stat = "identity", linewidth = 0.5) + geom_point(aes(y = y)) + labs( y = "Water Level (ft)", @@ -321,7 +321,7 @@ The initial step for the exact computation is to calculate the log-predictive densities by refitting the model many times: ```{r exact_loglik, results="hide"} -loglik_exact <- matrix(nrow = nsamples(fit), ncol = N) +loglik_exact <- matrix(nrow = ndraws(fit), ncol = N) for (i in L:(N - 1)) { past <- 1:i oos <- i + 1 @@ -514,7 +514,7 @@ predict. ```{r exact_loglikm, results="hide"} M <- 4 -loglikm <- matrix(nrow = nsamples(fit), ncol = N) +loglikm <- matrix(nrow = ndraws(fit), ncol = N) for (i in L:(N - M)) { past <- 1:i oos <- (i + 1):(i + M) diff --git a/vignettes/loo2-non-factorized.Rmd b/vignettes/loo2-non-factorized.Rmd index a48b0256..fb79ea03 100644 --- a/vignettes/loo2-non-factorized.Rmd +++ b/vignettes/loo2-non-factorized.Rmd @@ -569,7 +569,7 @@ is strong. In fact, summing over the pointwise ELPD values and leaving out the fourth observation yields practically equivalent results for approximate and exact LOO-CV: -````{r pt4} +```{r pt4} without_pt_4 <- c( approx = sum(psis_loo$pointwise[-4, "elpd_loo"]), exact = sum(exact_elpds[-4])