From 75e6858f9657cb747c7831670883a11fcd8c4abc Mon Sep 17 00:00:00 2001 From: elimillera Date: Tue, 10 Jan 2023 20:42:38 +0000 Subject: [PATCH 1/7] Update workflow versions --- .github/workflows/R-CMD-check.yaml | 4 ++-- .github/workflows/pkgdown.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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..17e6499a 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -17,9 +17,9 @@ 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 From e4ac0250f134486fbbf4f74bedf79a3620ffc661 Mon Sep 17 00:00:00 2001 From: elimillera Date: Tue, 10 Jan 2023 20:48:48 +0000 Subject: [PATCH 2/7] Update pkg down deps --- .github/workflows/pkgdown.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 17e6499a..086d08c1 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -23,7 +23,7 @@ jobs: 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 needs: website From c508a6a810bd0270751bf18e0e1a8962b6c62b70 Mon Sep 17 00:00:00 2001 From: elimillera Date: Tue, 10 Jan 2023 20:57:45 +0000 Subject: [PATCH 3/7] Add pkgdown workflow --- .github/workflows/pkgdown.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 086d08c1..7f017eb1 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -25,7 +25,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: pkgdown + extra-packages: any::pkgdown needs: website - name: Deploy package From 99d418b9a3b852ca7b65e8f2f5bdfff5dc91bf21 Mon Sep 17 00:00:00 2001 From: elimillera Date: Tue, 10 Jan 2023 21:03:12 +0000 Subject: [PATCH 4/7] add local pkg down --- .github/workflows/pkgdown.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 7f017eb1..3c379133 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -25,7 +25,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::pkgdown + extra-packages: any::pkgdown, local::. needs: website - name: Deploy package From 33df5cc2a87bc411d6d5f1fa07b23d777dcb5181 Mon Sep 17 00:00:00 2001 From: Shiyu Chen Date: Thu, 14 Dec 2023 17:20:48 +0000 Subject: [PATCH 5/7] Documentation updates and typo corrections --- R/apply_conditional_format.R | 8 ++++---- vignettes/table.Rmd | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) 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/vignettes/table.Rmd b/vignettes/table.Rmd index 0d4ab526..c0f888f6 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")` From ae5b9cf3c7a366755156ec7d3c28b7004cd13390 Mon Sep 17 00:00:00 2001 From: Shiyu Chen Date: Thu, 14 Dec 2023 18:07:30 +0000 Subject: [PATCH 6/7] Function in ticks --- vignettes/table.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/table.Rmd b/vignettes/table.Rmd index c0f888f6..1f268b3d 100644 --- a/vignettes/table.Rmd +++ b/vignettes/table.Rmd @@ -115,7 +115,7 @@ 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. +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. From dcfaab073780c7c3750945bde6150d33a2d82bdc Mon Sep 17 00:00:00 2001 From: Shiyu Chen Date: Thu, 14 Dec 2023 18:10:56 +0000 Subject: [PATCH 7/7] Typo corrections in test --- tests/testthat/test-apply_conditional_format.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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(