diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 99c7c3d5..15560054 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -34,11 +34,11 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - name: Query dependencies run: | diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 63cbb18a..3c379133 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -17,15 +17,15 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: pkgdown + extra-packages: any::pkgdown, local::. needs: website - name: Deploy package diff --git a/R/apply_conditional_format.R b/R/apply_conditional_format.R index 16198fa1..54583b07 100644 --- a/R/apply_conditional_format.R +++ b/R/apply_conditional_format.R @@ -11,15 +11,15 @@ #' @noRd validate_conditional_format_params <- function(string, format_group, condition, replacement, full_string) { if (!inherits(string, "character")) { - stop("Paramter `string` must be a character vector", call.=FALSE) + stop("Parameter `string` must be a character vector", call.=FALSE) } if (!inherits(format_group, "numeric") || (inherits(format_group, "numeric") && format_group %% 1 != 0)) { - stop("Paramter `format_group` must be an integer", call.=FALSE) + stop("Parameter `format_group` must be an integer", call.=FALSE) } if (!inherits(replacement, "character")) { - stop("Paramter `replacement` must be a string", call.=FALSE) + stop("Parameter `replacement` must be a string", call.=FALSE) } # Condition statement must use the variable name 'x' @@ -28,7 +28,7 @@ validate_conditional_format_params <- function(string, format_group, condition, } if (!inherits(full_string, "logical")) { - stop("Paramter `full_string` must be bool", call.=FALSE) + stop("Parameter `full_string` must be bool", call.=FALSE) } } diff --git a/tests/testthat/test-apply_conditional_format.R b/tests/testthat/test-apply_conditional_format.R index a2b2f928..6740d04d 100644 --- a/tests/testthat/test-apply_conditional_format.R +++ b/tests/testthat/test-apply_conditional_format.R @@ -4,17 +4,17 @@ test_string2 <- c(" 0 ( 0.0%)", " 8 ( 9.3%)", "78 (90.7%) [ 5]", "12", "Howdy ya test_that("Test input validation and warning generation", { expect_error( apply_conditional_format(c(1), 2, x == 0, "(<1%)", full_string=TRUE), - "Paramter `string`" + "Parameter `string`" ) expect_error( apply_conditional_format(test_string1, "bad", x == 0, "(<1%)", full_string=TRUE), - "Paramter `format_group`" + "Parameter `format_group`" ) expect_error( apply_conditional_format(test_string1, 1.1, x == 0, "(<1%)", full_string=TRUE), - "Paramter `format_group`" + "Parameter `format_group`" ) expect_error( @@ -24,12 +24,12 @@ test_that("Test input validation and warning generation", { expect_error( apply_conditional_format(test_string1, 2, x == 0, 1, full_string=TRUE), - "Paramter `replacement" + "Parameter `replacement" ) expect_error( apply_conditional_format(test_string1, 2, x == 0, "(<1%)", full_string="TRUE"), - "Paramter `full_string`" + "Parameter `full_string`" ) expect_warning( diff --git a/vignettes/table.Rmd b/vignettes/table.Rmd index 0d4ab526..1f268b3d 100644 --- a/vignettes/table.Rmd +++ b/vignettes/table.Rmd @@ -115,6 +115,8 @@ header_n(t) %>% kable() ``` +Note: it’s expected the `set_distinct_by()` function is used with population data. This is because it does not make sense to use population data denominators unless you have distinct counts. The entire point of population data is to use subject counts, so non-distinct counts would potentially count multiple records per subject and then the percentage doesn’t make any sense. + With the table level settings under control, now you're ready to learn more about what **Tplyr** has to offer in each layer. - Learn more about descriptive statistics layers in `vignette("desc")`