From ce8e7cceac1767a336722988eecafd83d5ac4b58 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 23 Oct 2024 17:21:51 +0100 Subject: [PATCH] more CRAN checks --- R/pcd_cmdstan_model.R | 6 ++++-- R/pcens.R | 2 +- man/new_pcens.Rd | 2 +- man/pcd_cmdstan_model.Rd | 6 ++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/R/pcd_cmdstan_model.R b/R/pcd_cmdstan_model.R index d636cdb..20d54f6 100644 --- a/R/pcd_cmdstan_model.R +++ b/R/pcd_cmdstan_model.R @@ -25,8 +25,10 @@ #' @family modelhelpers #' #' @examplesIf requireNamespace("cmdstanr", quietly = TRUE) -#' model <- pcd_cmdstan_model(compile = FALSE) -#' model +#' if (!is.null(cmdstanr::cmdstan_version())) { +#' model <- pcd_cmdstan_model(compile = FALSE) +#' model +#' } pcd_cmdstan_model <- function( include_paths = primarycensored::pcd_stan_path(), ...) { diff --git a/R/pcens.R b/R/pcens.R index ffaf874..c71a596 100644 --- a/R/pcens.R +++ b/R/pcens.R @@ -2,7 +2,7 @@ #' #' @inheritParams pprimarycensored #' -#' @return An object of class pcens_{pdist_name}_{dprimary_name} +#' @return An object of class `pcens_{pdist_name}_{dprimary_name}` #' #' @family pcens #' diff --git a/man/new_pcens.Rd b/man/new_pcens.Rd index 6b68a7e..6d83d3c 100644 --- a/man/new_pcens.Rd +++ b/man/new_pcens.Rd @@ -44,7 +44,7 @@ passed a pre-assigned variable rather than a function name.} \item{...}{Additional arguments to be passed to pdist} } \value{ -An object of class pcens_{pdist_name}_{dprimary_name} +An object of class \verb{pcens_\{pdist_name\}_\{dprimary_name\}} } \description{ S3 class for primary event censored distribution computation diff --git a/man/pcd_cmdstan_model.Rd b/man/pcd_cmdstan_model.Rd index 87d79a0..dca5428 100644 --- a/man/pcd_cmdstan_model.Rd +++ b/man/pcd_cmdstan_model.Rd @@ -34,8 +34,10 @@ within chain parallelism). } \examples{ \dontshow{if (requireNamespace("cmdstanr", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -model <- pcd_cmdstan_model(compile = FALSE) -model +if (!is.null(cmdstanr::cmdstan_version())) { + model <- pcd_cmdstan_model(compile = FALSE) + model +} \dontshow{\}) # examplesIf} } \seealso{