Skip to content

Commit

Permalink
Attempt to fix CMD check issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasWallrich committed Sep 16, 2024
1 parent a179a9d commit 7dc0717
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions R/misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,11 @@ named_list <- function(...) {
#'
#' @return A character vector of concatenated strings.
#' @examples
#' paste_("hello", NA, "you") # returns "hello you"
#' paste_(c("hello", "world"), c(NA, "everyone"), c("you", NA)) # returns c("hello you", "world everyone")
#' paste_("hello", NA, "you")
#' # returns "hello you"
#'
#' paste_(c("hello", "world"), c(NA, "everyone"), c("you", NA))
#' # returns c("hello you", "world everyone")
#'
#' @export

Expand Down
4 changes: 2 additions & 2 deletions R/mod_tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -587,14 +587,14 @@ gt_apa_style <- function(gt_table, fmt_labels_md = TRUE, row_group_background =
style = list(
gt::cell_text(weight = "bold")
),
locations = gt::cells_row_groups(groups = everything())
locations = gt::cells_row_groups(groups = gt::everything())
)

if (!is.null(row_group_background)) {
out <- out %>%
gt::tab_style(
style = gt::cell_fill(color = row_group_background),
locations = gt::cells_row_groups(groups = everything())
locations = gt::cells_row_groups(groups = gt::everything())
)
}

Expand Down
3 changes: 2 additions & 1 deletion R/stat_tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,8 @@ pairwise_t_tests <- function(data, outcome, groups = NULL, p.adjust.method = p.a
if (is.numeric(group_values) && is.null(attr(group_values, "labels"))) {
haven_available <- suppressWarnings(requireNamespace("haven", quietly = TRUE))
if (haven_available) {
data <- data %>% dplyr::mutate({{ groups }} := haven::as_factor({{ groups }}))
as_factor <- getNamespace("haven")$as_factor
data <- data %>% dplyr::mutate({{ groups }} := as_factor({{ groups }}))
} else {
warning("The grouping variable is a labelled numeric, but haven package is not available. It will be converted to factor, but the group labels might be lost.")
data <- data %>% dplyr::mutate({{ groups }} := as.factor({{ groups }}))
Expand Down

0 comments on commit 7dc0717

Please sign in to comment.