select_helpers {broom.helpers}R Documentation

Select helper functions

Description

Set of functions to supplement the tidyselect set of functions for selecting columns of data frames (and other items as well).

Usage

all_continuous(continuous2 = TRUE)

all_categorical(dichotomous = TRUE)

all_dichotomous()

all_interaction()

all_ran_pars()

all_ran_vals()

all_intercepts()

all_contrasts(
  contrasts_type = c("treatment", "sum", "poly", "helmert", "sdif", "other")
)

Arguments

continuous2

(logical)
Whether to include continuous2 variables, default is TRUE. For compatibility with {gtsummary}), see gtsummary::all_continuous2().

dichotomous

(logical)
Whether to include dichotomous variables, default is TRUE.

contrasts_type

(string)
Type of contrast to select. When NULL, all variables with a contrast will be selected. Default is NULL. Select among contrast types c("treatment", "sum", "poly", "helmert", "sdif", "other").

Value

A character vector of column names selected.

See Also

scope_tidy()

Examples


glm(response ~ age * trt + grade, gtsummary::trial, family = binomial) |>
  tidy_plus_plus(exponentiate = TRUE, include = all_categorical())

glm(response ~ age + trt + grade + stage,
  gtsummary::trial,
  family = binomial,
  contrasts = list(trt = contr.SAS, grade = contr.sum, stage = contr.poly)
) |>
  tidy_plus_plus(
    exponentiate = TRUE,
    include = all_contrasts(c("treatment", "sum"))
  )


[Package broom.helpers version 1.18.0 Index]