Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
larmarange committed Aug 22, 2024
1 parent 776a96c commit 0d77dd5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion R/scope_tidy.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ scope_tidy <- function(x, data = NULL) {
unique() |>
tidyr::drop_na()
for (i in seq_len(nrow(df_class))) {
f <- switch (
f <- switch(
df_class$var_class[i],
"character" = as.character,
"factor" = as.factor,
Expand Down
2 changes: 1 addition & 1 deletion R/select_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ all_intercepts <- function() {

#' @rdname select_helpers
#' @export
all_contrasts <- function(contrasts_type = c("treatment", "sum", "poly", "helmert", "sdif", "other")) {
all_contrasts <- function(contrasts_type = c("treatment", "sum", "poly", "helmert", "sdif", "other")) { # nolint
contrasts_type <- rlang::arg_match(contrasts_type, multiple = TRUE)
where(function(x) isTRUE(attr(x, "gtsummary.contrasts_type") %in% contrasts_type))
}
10 changes: 0 additions & 10 deletions R/select_utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,6 @@
# if var_info is provided, scope it
if (!is.null(var_info)) data <- scope_tidy(var_info, data)

# # convert var_info to data frame if data not provided ------------------------
# if (is.null(data)) data <- .var_info_to_df(var_info)
#
# if (!is.null(var_info)) {
# # scoping the variable types
# .scope_var_info(var_info)
# # un-scoping on exit
# on.exit(rm(list = ls(envir = env_variable_type), envir = env_variable_type))
# }

# determine if selecting input begins with `var()`
select_input_starts_var <-
!rlang::quo_is_symbol(select) && # if not a symbol (ie name)
Expand Down

0 comments on commit 0d77dd5

Please sign in to comment.