From 49912f091eb9453f4eec7d31c1a39a816d599dcf Mon Sep 17 00:00:00 2001 From: Santtu Tikka Date: Tue, 22 Aug 2023 11:16:13 +0300 Subject: [PATCH] update docs --- man/as_draws-dynamitefit.Rd | 3 +++ man/dynamite.Rd | 3 +++ man/mcmc_diagnostics.Rd | 3 +++ man/plot_deltas.Rd | 3 +++ 4 files changed, 12 insertions(+) diff --git a/man/as_draws-dynamitefit.Rd b/man/as_draws-dynamitefit.Rd index 2f5d7f7..e6847cb 100644 --- a/man/as_draws-dynamitefit.Rd +++ b/man/as_draws-dynamitefit.Rd @@ -55,7 +55,10 @@ See potential values for the types argument in argument. } \examples{ +threads <- data.table::getDTthreads() +data.table::setDTthreads(threads = 1) # For CRAN as_draws(gaussian_example_fit, types = c("sigma", "beta")) +data.table::setDTthreads(threads = threads) # Restore # Compute MCMC diagnostics using the posterior package posterior::summarise_draws(as_draws(gaussian_example_fit)) diff --git a/man/dynamite.Rd b/man/dynamite.Rd index 365ab6e..409309d 100644 --- a/man/dynamite.Rd +++ b/man/dynamite.Rd @@ -160,6 +160,8 @@ shape of the posterior), this can vary greatly. # Please update your rstan and StanHeaders installation before running # on Windows if (!identical(.Platform$OS.type, "windows")) { + threads <- data.table::getDTthreads() + data.table::setDTthreads(threads = 1) # For CRAN fit <- dynamite( dformula = obs(y ~ -1 + varying(~x), family = "gaussian") + lags(type = "varying") + @@ -170,6 +172,7 @@ if (!identical(.Platform$OS.type, "windows")) { chains = 1, refresh = 0 ) + data.table::setDTthreads(threads = threads) # Restore } } diff --git a/man/mcmc_diagnostics.Rd b/man/mcmc_diagnostics.Rd index baaf50f..763d863 100644 --- a/man/mcmc_diagnostics.Rd +++ b/man/mcmc_diagnostics.Rd @@ -25,7 +25,10 @@ sizes and largest Rhat values. See \code{\link[rstan:check_hmc_diagnostics]{rsta \code{\link[posterior:draws_summary]{posterior::default_convergence_measures()}} for details. } \examples{ +threads <- data.table::getDTthreads() +data.table::setDTthreads(threads = 1) # For CRAN mcmc_diagnostics(gaussian_example_fit) +data.table::setDTthreads(threads = threads) # Restore } \seealso{ diff --git a/man/plot_deltas.Rd b/man/plot_deltas.Rd index c82cb76..219c8f7 100644 --- a/man/plot_deltas.Rd +++ b/man/plot_deltas.Rd @@ -44,8 +44,11 @@ A \code{ggplot} object. Plot Time-varying Regression Coefficients of a Dynamite Model } \examples{ +threads <- data.table::getDTthreads() +data.table::setDTthreads(threads = 1) # For CRAN plot_deltas(gaussian_example_fit, level = 0.025, scales = "free") + ggplot2::theme_minimal() +data.table::setDTthreads(threads = threads) # Restore } \seealso{