Skip to content

Commit

Permalink
Fix R CMD check notes
Browse files Browse the repository at this point in the history
  • Loading branch information
nanxstats committed Apr 12, 2024
1 parent 39a1c87 commit fa8c8db
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 39 deletions.
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
3 changes: 2 additions & 1 deletion 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 @@ -76,7 +77,7 @@
#' spending_fun_par = -4,
#' 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 fa8c8db

Please sign in to comment.