Skip to content

Commit 3392e04

Browse files
committed
Check if tibble is available
1 parent abf055e commit 3392e04

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

tests/testthat/test-default_split_funs.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ test_that("drop_and_remove_levels also works with character variables", {
249249
})
250250

251251
test_that("trim_levels_to_map split function works", {
252+
skip_if_not_installed("tibble")
253+
require(tibble, quietly = TRUE)
254+
252255
map <- data.frame(
253256
LBCAT = c("CHEMISTRY", "CHEMISTRY", "CHEMISTRY", "IMMUNOLOGY"),
254257
PARAMCD = c("ALT", "CRP", "CRP", "IGA"),

tests/testthat/test-lyt-tabulation.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ test_that("labelkids parameter works", {
237237

238238

239239
test_that("ref_group comparisons work", {
240+
skip_if_not_installed("tibble")
241+
require(tibble, quietly = TRUE)
242+
240243
blthing <- basic_table() %>%
241244
split_cols_by("ARM", ref_group = "ARM1") %>%
242245
analyze("AGE", show_labels = "hidden") %>%

tests/testthat/test-printing.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,9 @@ test_that("horizontal separator is propagated from table to print and export", {
801801
## higher-level showing ncols works:
802802

803803
test_that("showing higher-level ncols works", {
804+
skip_if_not_installed("tibble")
805+
require(tibble, quietly = TRUE)
806+
804807
mydat <- subset(ex_adsl, SEX %in% c("M", "F"))
805808
mydat$SEX2 <- factor(
806809
ifelse(

tests/testthat/test-subset-access.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ test_rowpaths <- function(tt, visonly = TRUE) {
136136

137137

138138
test_that("make_row_df, make_col_df give paths which all work", {
139+
skip_if_not_installed("tibble")
140+
require(tibble, quietly = TRUE)
141+
139142
lyt <- basic_table() %>%
140143
split_cols_by("ARM") %>%
141144
split_cols_by("SEX", ref_group = "F") %>%

0 commit comments

Comments
 (0)