Skip to content

Commit

Permalink
Merge pull request #38 from Merck/rcmdcheck
Browse files Browse the repository at this point in the history
Fix `R CMD check` notes
  • Loading branch information
LittleBeannie committed Apr 15, 2024
2 parents 39a1c87 + 6bda2ed commit b770aeb
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 47 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -47,3 +47,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -41,7 +41,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ name: Style
jobs:
style:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -46,7 +48,7 @@ jobs:
shell: Rscript {0}

- name: Cache styler
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.styler-location.outputs.location }}
key: ${{ runner.os }}-styler-${{ github.sha }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -31,20 +31,20 @@ jobs:
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ VignetteBuilder:
knitr
Config/testthat/edition: 3
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
2 changes: 2 additions & 0 deletions R/calc_seq_p.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#' @export
#'
#' @examples
#' \donttest{
#' calc_seq_p(
#' test_analysis = 2,
#' test_hypothesis = "H1, H2, H3",
Expand Down Expand Up @@ -77,6 +78,7 @@
#' info_frac = c(0.5, 1),
#' interval = c(1e-4, 0.2)
#' )
#' }
calc_seq_p <- function(
test_analysis = 2,
test_hypothesis = "H1, H2, H3",
Expand Down
2 changes: 2 additions & 0 deletions R/globals.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
utils::globalVariables(
unique(
c(
# From `calc_seq_p()`
c("analysis"),
# From `closed_test()`
c("Analysis"),
# From `generate_bounds()`
Expand Down
61 changes: 35 additions & 26 deletions man/calc_seq_p.Rd

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

20 changes: 9 additions & 11 deletions vignettes/adj-seq-p.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ vignette: >
---

```{r, message = FALSE, warning = FALSE}
library(wpgsd)
library(gsDesign)
library(tibble)
library(gt)
library(gsDesign)
library(dplyr)
library(mvtnorm)
library(ggplot2)
library(wpgsd)
```

# Example overview
Expand Down Expand Up @@ -790,23 +788,23 @@ ans %>%
`Sequential p-values of Weighted Bonferroni`, `Adjusted-sequential p-values of Weighted Bonferroni`,
`Sequential p-values of WPGSD`, `Adjusted-sequential p-values of WPGSD`
) %>%
gt::gt() %>%
gt::tab_spanner(
gt() %>%
tab_spanner(
label = "Weighted Bonferroni",
columns = c(`Sequential p-values of Weighted Bonferroni`, `Adjusted-sequential p-values of Weighted Bonferroni`)
) %>%
gt::tab_spanner(
tab_spanner(
label = "WPGSD",
columns = c(`Sequential p-values of WPGSD`, `Adjusted-sequential p-values of WPGSD`)
) %>%
gt::tab_style_body(
tab_style_body(
columns = where(is.numeric),
style = cell_fill(color = "pink"),
fn = function(x) x <= 0.025
) %>%
gt::fmt_number(columns = 3:6, decimals = 4) %>%
gt::tab_header(
fmt_number(columns = 3:6, decimals = 4) %>%
tab_header(
title = "(Adjusted-) sequential p-values",
subtitle = "Multiple populations"
) # %>% gt::as_latex()
) # %>% as_latex()
```

0 comments on commit b770aeb

Please sign in to comment.