From 24ad5fcd50759555f2a1b9a2e866259b162fce0f Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Thu, 4 Jul 2024 07:05:00 -0700 Subject: [PATCH] only run examples when survey is available --- R/ard_dichotomous.survey.design.R | 2 +- man/ard_dichotomous.survey.design.Rd | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/R/ard_dichotomous.survey.design.R b/R/ard_dichotomous.survey.design.R index 988bcdafa..d7b023586 100644 --- a/R/ard_dichotomous.survey.design.R +++ b/R/ard_dichotomous.survey.design.R @@ -11,7 +11,7 @@ #' @return an ARD data frame of class 'card' #' @export #' -#' @examples +#' @examplesIf cardx:::is_pkg_installed("survey", reference_pkg = "cardx") #' survey::svydesign(ids = ~1, data = mtcars, weights = ~1) |> #' ard_dichotomous(by = vs, variables = c(cyl, am), value = list(cyl = 4)) ard_dichotomous.survey.design <- function(data, diff --git a/man/ard_dichotomous.survey.design.Rd b/man/ard_dichotomous.survey.design.Rd index 7dd2ce697..315dd083d 100644 --- a/man/ard_dichotomous.survey.design.Rd +++ b/man/ard_dichotomous.survey.design.Rd @@ -65,6 +65,8 @@ an ARD data frame of class 'card' Compute Analysis Results Data (ARD) for dichotomous summary statistics. } \examples{ +\dontshow{if (cardx:::is_pkg_installed("survey", reference_pkg = "cardx")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} survey::svydesign(ids = ~1, data = mtcars, weights = ~1) |> ard_dichotomous(by = vs, variables = c(cyl, am), value = list(cyl = 4)) +\dontshow{\}) # examplesIf} }