diff --git a/DESCRIPTION b/DESCRIPTION index d7469ab..404497a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -35,4 +35,4 @@ Config/testthat/edition: 3 Encoding: UTF-8 Language: en-US Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.0 +RoxygenNote: 7.3.1 diff --git a/R/reporting.R b/R/reporting.R index 9b00437..543690f 100644 --- a/R/reporting.R +++ b/R/reporting.R @@ -48,7 +48,7 @@ inspect <- function(i, pheno, omit = NULL, index_name = "batch") { #' nas <- c(137, 70) # Omit rows with NA to avoid warnings in design #' index <- design(pheno = survey[-nas, columns], size_subset = 70, #' iterations = 10) -#' batches <- inspect(index, survey[, columns]) +#' batches <- inspect(index, survey[-nas, columns]) #' distribution(batches, "Sex") #' distribution(batches, "Smoke") distribution <- function(report, column){ diff --git a/man/distribution.Rd b/man/distribution.Rd index a9bfa42..41c5e89 100644 --- a/man/distribution.Rd +++ b/man/distribution.Rd @@ -25,7 +25,7 @@ columns <- c("Sex", "Age", "Smoke") nas <- c(137, 70) # Omit rows with NA to avoid warnings in design index <- design(pheno = survey[-nas, columns], size_subset = 70, iterations = 10) -batches <- inspect(index, survey[, columns]) +batches <- inspect(index, survey[-nas, columns]) distribution(batches, "Sex") distribution(batches, "Smoke") } diff --git a/tests/testthat/test-distribution.R b/tests/testthat/test-distribution.R index 454b150..317aaa9 100644 --- a/tests/testthat/test-distribution.R +++ b/tests/testthat/test-distribution.R @@ -5,7 +5,7 @@ test_that("distribution works", { nas <- c(137, 70) index <- design(pheno = survey[-nas, columns], size_subset = 70, iterations = 10) - batches <- inspect(index, survey[, columns]) + batches <- inspect(index, survey[-nas, columns]) expect_true(distribution(batches, "Sex")) expect_true(distribution(batches, "Smoke")) })