Skip to content

Commit

Permalink
Adding examplesIf fencing
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg committed Nov 27, 2024
1 parent 0915847 commit dd35a63
Show file tree
Hide file tree
Showing 28 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion R/add_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#' @return gtsummary table
#' @name add_ci
#'
#' @examplesIf gtsummary:::is_pkg_installed("cardx") && gtsummary:::is_pkg_installed("broom", ref = "cardx")
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed("cardx") && gtsummary:::is_pkg_installed("broom", ref = "cardx")
#' # Example 1 ----------------------------------
#' trial |>
#' tbl_summary(
Expand Down
2 changes: 1 addition & 1 deletion R/add_ci.tbl_svysummary.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#' @export
#' @name add_ci.tbl_svysummary
#'
#' @examplesIf gtsummary:::is_pkg_installed(c("cardx", "survey")) && gtsummary:::is_pkg_installed("broom", ref = "cardx")
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed(c("cardx", "survey")) && gtsummary:::is_pkg_installed("broom", ref = "cardx")
#' data(api, package = "survey")
#' survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) |>
#' tbl_svysummary(
Expand Down
2 changes: 1 addition & 1 deletion R/add_difference.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ add_difference <- function(x, ...) {
#' @export
#' @return a gtsummary table of class `"tbl_summary"`
#'
#' @examplesIf gtsummary:::is_pkg_installed("cardx") && gtsummary:::is_pkg_installed("broom", ref = "cardx")
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed("cardx") && gtsummary:::is_pkg_installed("broom", ref = "cardx")
#' # Example 1 ----------------------------------
#' trial |>
#' select(trt, age, marker, response, death) %>%
Expand Down
2 changes: 1 addition & 1 deletion R/add_difference.tbl_svysummary.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' @export
#' @return a gtsummary table of class `"tbl_summary"`
#'
#' @examplesIf gtsummary:::is_pkg_installed("cardx") && gtsummary:::is_pkg_installed("broom", ref = "cardx")
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed("cardx") && gtsummary:::is_pkg_installed("broom", ref = "cardx")
add_difference.tbl_svysummary <- function(x,
test = NULL,
group = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/add_glance.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#' modify_table_body(~.x %>% arrange(row_type == "glance_statistic"))
#' ````
#'
#' @examples
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed("cardx")
#' mod <- lm(age ~ marker + grade, trial) |> tbl_regression()
#'
#' # Example 1 ----------------------------------
Expand Down
2 changes: 1 addition & 1 deletion R/add_global_p.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' @author Daniel D. Sjoberg
#' @name add_global_p
#'
#' @examplesIf gtsummary:::is_pkg_installed(c("cardx", "broom", "car", "parameters"))
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed(c("cardx", "broom", "car", "parameters"))
#' # Example 1 ----------------------------------
#' lm(marker ~ age + grade, trial) |>
#' tbl_regression() |>
Expand Down
2 changes: 1 addition & 1 deletion R/add_n.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ add_n <- function(x, ...) {
#' @name add_n_summary
#'
#' @return A table of class `c('tbl_summary', 'gtsummary')`
#' @examplesIf gtsummary:::is_pkg_installed(c("survey", "cardx"))
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed(c("survey", "cardx"))
#' # Example 1 ----------------------------------
#' trial |>
#' tbl_summary(by = trt, include = c(trt, age, grade, response)) |>
Expand Down
2 changes: 1 addition & 1 deletion R/add_n.tbl_survfit.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @param ... Not used
#' @export
#'
#' @examplesIf gtsummary:::is_pkg_installed("survival")
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed("survival")
#' library(survival)
#' fit1 <- survfit(Surv(ttdeath, death) ~ 1, trial)
#' fit2 <- survfit(Surv(ttdeath, death) ~ trt, trial)
Expand Down
2 changes: 1 addition & 1 deletion R/add_p.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ add_p <- function(x, ...) {
#'
#' - `"ancova"` when variable is continuous and `by` variable has two levels.
#'
#' @examplesIf gtsummary:::is_pkg_installed("cardx") && gtsummary:::is_pkg_installed("broom", ref = "cardx")
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed("cardx") && gtsummary:::is_pkg_installed("broom", ref = "cardx")
#' # Example 1 ----------------------------------
#' trial |>
#' tbl_summary(by = trt, include = c(age, grade)) |>
Expand Down
2 changes: 1 addition & 1 deletion R/add_p.tbl_survfit.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' If you utilize the `tbl_survfit.data.frame()` S3 method, this is handled for you.
#'
#' @export
#' @examplesIf gtsummary:::is_pkg_installed(c("cardx", "survival", "broom"))
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed(c("cardx", "survival", "broom"))
#' library(survival)
#'
#' gts_survfit <-
Expand Down
2 changes: 1 addition & 1 deletion R/add_p.tbl_svysummary.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#' @return a gtsummary table of class `"tbl_svysummary"`
#' @export
#'
#' @examplesIf gtsummary:::is_pkg_installed(c("cardx", "survey")) && gtsummary:::is_pkg_installed("broom", ref = "cardx")
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed(c("cardx", "survey")) && gtsummary:::is_pkg_installed("broom", ref = "cardx")
#' # Example 1 ----------------------------------
#' # A simple weighted dataset
#' survey::svydesign(~1, data = as.data.frame(Titanic), weights = ~Freq) |>
Expand Down
2 changes: 1 addition & 1 deletion R/add_significance_stars.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' @export
#' @return a 'gtsummary' table
#'
#' @examplesIf gtsummary:::is_pkg_installed("car")
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed("car")
#' tbl <-
#' lm(time ~ ph.ecog + sex, survival::lung) |>
#' tbl_regression(label = list(ph.ecog = "ECOG Score", sex = "Sex"))
Expand Down
2 changes: 1 addition & 1 deletion R/add_vif.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @seealso Review [list, formula, and selector syntax][syntax] used throughout gtsummary
#' @export
#'
#' @examplesIf gtsummary:::is_pkg_installed(c("cardx", "car"))
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed(c("cardx", "car"))
#' # Example 1 ----------------------------------
#' lm(age ~ grade + marker, trial) |>
#' tbl_regression() |>
Expand Down
2 changes: 1 addition & 1 deletion R/glance_fun.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @name glance_fun_s3
#' @keywords internal
#'
#' @examples
#' @examplesIf (identical(Sys.getenv("NOT_CRAN"), "true") || identical(Sys.getenv("IN_PKGDOWN"), "true")) && gtsummary:::is_pkg_installed("cardx")
#' mod <- lm(age ~ trt, trial)
#'
#' glance_fun_s3(mod)
Expand Down
2 changes: 1 addition & 1 deletion man/add_ci.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/add_ci.tbl_svysummary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/add_difference.tbl_summary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/add_difference.tbl_svysummary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/add_glance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/add_global_p.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/add_n.tbl_survfit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/add_n_summary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/add_p.tbl_summary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/add_p.tbl_survfit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/add_p.tbl_svysummary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/add_significance_stars.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/add_vif.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/glance_fun_s3.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dd35a63

Please sign in to comment.