Skip to content

Commit

Permalink
update green ci (#928)
Browse files Browse the repository at this point in the history
close #916

---------

Signed-off-by: Davide Garolini <[email protected]>
Signed-off-by: Joe Zhu <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Davide Garolini <[email protected]>
Co-authored-by: Pawel Rucki <[email protected]>
  • Loading branch information
5 people authored Sep 6, 2024
1 parent 4155470 commit afc88ef
Show file tree
Hide file tree
Showing 44 changed files with 336 additions and 83 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ URL: https://github.com/insightsengineering/rtables,
https://insightsengineering.github.io/rtables/
BugReports: https://github.com/insightsengineering/rtables/issues
Depends:
formatters (>= 0.5.8),
formatters (>= 0.5.8.9006),
magrittr (>= 1.5),
methods,
R (>= 2.10)
Expand Down
10 changes: 6 additions & 4 deletions R/colby_constructors.R
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ setMethod(
#' tbl2 <- build_table(lyt2, DM)
#' tbl2
#'
#' @examplesIf require(dplyr)
#' # By default sequentially adding layouts results in nesting
#' library(dplyr)
#'
Expand Down Expand Up @@ -472,6 +473,7 @@ setMethod(
#'
#' lyt3
#'
#' @examplesIf require(dplyr)
#' library(dplyr)
#'
#' DM2 <- DM %>%
Expand Down Expand Up @@ -548,7 +550,7 @@ split_rows_by <- function(lyt,
#'
#' @seealso [analyze_colvars()]
#'
#' @examples
#' @examplesIf require(dplyr)
#' library(dplyr)
#'
#' ANL <- DM %>% mutate(value = rnorm(n()), pctdiff = runif(n()))
Expand Down Expand Up @@ -661,7 +663,7 @@ split_rows_by_multivar <- function(lyt,
#'
#' @inherit split_cols_by return
#'
#' @examples
#' @examplesIf require(dplyr)
#' library(dplyr)
#'
#' # split_cols_by_cuts
Expand Down Expand Up @@ -1188,7 +1190,7 @@ get_acolvar_vars <- function(lyt) {
#'
#' @seealso [split_cols_by_multivar()]
#'
#' @examples
#' @examplesIf require(dplyr)
#' library(dplyr)
#'
#' ANL <- DM %>% mutate(value = rnorm(n()), pctdiff = runif(n()))
Expand Down Expand Up @@ -2117,7 +2119,7 @@ basic_table <- function(title = "",
#'
#' @seealso [top_left()]
#'
#' @examples
#' @examplesIf require(dplyr)
#' library(dplyr)
#'
#' DM2 <- DM %>% mutate(RACE = factor(RACE), SEX = factor(SEX))
Expand Down
3 changes: 2 additions & 1 deletion R/default_split_funs.R
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ select_all_levels <- new("AllLevelsSentinel")
#' @note
#' Analysis or summary functions for which the order matters should never be used within the tabulation framework.
#'
#' @examples
#' @examplesIf require(tibble)
#'
#' library(tibble)
#' combodf <- tribble(
#' ~valname, ~label, ~levelcombo, ~exargs,
Expand Down
6 changes: 3 additions & 3 deletions R/summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ col_paths <- function(x) {
#'
#' @return A data frame summarizing the row- or column-structure of `x`.
#'
#' @examples
#' @examplesIf require(dplyr)
#' ex_adsl_MF <- ex_adsl %>% dplyr::filter(SEX %in% c("M", "F"))
#'
#' lyt <- basic_table() %>%
Expand Down Expand Up @@ -155,7 +155,7 @@ col_paths_summary <- function(x) {
#' @param depth (`numeric(1)`)\cr depth.
#' @param indent (`numeric(1)`)\cr indent.
#'
#' @examples
#' @examplesIf require(dplyr)
#' library(dplyr)
#'
#' iris2 <- iris %>%
Expand Down Expand Up @@ -234,7 +234,7 @@ setMethod(
#'
#' @return No return value. Called for the side-effect of printing a row- or subtable-structure summary of `x`.
#'
#' @examples
#' @examplesIf require(dplyr)
#' library(dplyr)
#'
#' iris2 <- iris %>%
Expand Down
5 changes: 5 additions & 0 deletions R/tree_accessors.R
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,11 @@ setMethod(
)

#' @examples
#' lyt <- basic_table() %>%
#' split_rows_by("RACE", split_fun = keep_split_levels(c("ASIAN", "WHITE"))) %>%
#' analyze("AGE")
#'
#' tbl <- build_table(lyt, DM)
#' indent_mod(tbl)
#' indent_mod(tbl) <- 1L
#' tbl
Expand Down
13 changes: 9 additions & 4 deletions R/tt_export.R
Original file line number Diff line number Diff line change
Expand Up @@ -596,21 +596,20 @@ formatters::export_as_pdf
#'
#' @seealso [tt_to_flextable()]
#'
#' @examples
#' @examplesIf require(flextable)
#' library(flextable)
#' lyt <- basic_table() %>%
#' split_cols_by("ARM") %>%
#' analyze(c("AGE", "BMRKR2", "COUNTRY"))
#'
#' tbl <- build_table(lyt, ex_adsl)
#'
#' # See how section_properties_portrait function is built for custom
#' \dontrun{
#' tf <- tempfile(fileext = ".docx")
#' export_as_docx(tbl,
#' file = tf,
#' section_properties = section_properties_default(orientation = "landscape")
#' )
#' }
#'
#' @export
export_as_docx <- function(tt,
Expand Down Expand Up @@ -808,6 +807,11 @@ margins_landscape <- function() {
#' analyze("AGE", afun = analysisfun)
#'
#' tbl <- build_table(lyt, ex_adsl)
#'
#' @examplesIf require(flextable)
#' library(flextable)
#' # example code
#'
#' # rtables style
#' tt_to_flextable(tbl, theme = NULL)
#'
Expand Down Expand Up @@ -1041,7 +1045,8 @@ tt_to_flextable <- function(tt,
#'
#' @seealso [export_as_docx()]
#'
#' @examples
#' @examplesIf require(flextable)
#' library(flextable)
#' # Custom theme
#' special_bold <- list(
#' "header" = list("i" = 1, "j" = c(1, 3)),
Expand Down
1 change: 1 addition & 0 deletions R/tt_pos_and_access.R
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,7 @@ setMethod(
#' split_rows_by("STRATA1") %>%
#' analyze("AGE")
#'
#' @examplesIf require(dplyr)
#' library(dplyr) ## for mutate
#' tbl <- build_table(lyt, DM %>%
#' mutate(SEX = droplevels(SEX), RACE = droplevels(RACE)))
Expand Down
8 changes: 4 additions & 4 deletions R/tt_toString.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ NULL
#'
#' @return A string representation of `x` as it appears when printed.
#'
#' @examples
#' @examplesIf require(dplyr)
#' library(dplyr)
#'
#' iris2 <- iris %>%
Expand Down Expand Up @@ -80,7 +80,7 @@ setMethod("toString", "VTableTree", function(x,
#'
#' @seealso [value_formats()] for a matrix of formats for each cell in a table.
#'
#' @examples
#' @examplesIf require(dplyr)
#' library(dplyr)
#'
#' iris2 <- iris %>%
Expand Down Expand Up @@ -174,7 +174,7 @@ table_shell_str <- function(tt, widths = NULL, col_gap = 3, hsep = default_hsep(
#'
#' With an additional `nrow_header` attribute indicating the number of pseudo "rows" that the column structure defines.
#'
#' @examples
#' @examplesIf require(dplyr)
#' library(dplyr)
#'
#' iris2 <- iris %>%
Expand Down Expand Up @@ -646,7 +646,7 @@ get_formatted_fnotes <- function(tt) {
#'
#' @return The formatted print-strings for all (body) cells in `obj`.
#'
#' @examples
#' @examplesIf require(dplyr)
#' library(dplyr)
#'
#' iris2 <- iris %>%
Expand Down
4 changes: 3 additions & 1 deletion man/add_overall_level.Rd

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

3 changes: 2 additions & 1 deletion man/analyze_colvars.Rd

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

3 changes: 2 additions & 1 deletion man/append_topleft.Rd

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

3 changes: 2 additions & 1 deletion man/cell_values.Rd

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

6 changes: 3 additions & 3 deletions man/export_as_docx.Rd

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

3 changes: 2 additions & 1 deletion man/gfc.Rd

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

6 changes: 6 additions & 0 deletions man/int_methods.Rd

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

3 changes: 2 additions & 1 deletion man/matrix_form-VTableTree-method.Rd

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

3 changes: 2 additions & 1 deletion man/row_paths_summary.Rd

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

3 changes: 2 additions & 1 deletion man/split_cols_by.Rd

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

3 changes: 2 additions & 1 deletion man/split_cols_by_multivar.Rd

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

Loading

0 comments on commit afc88ef

Please sign in to comment.