Skip to contents

A tidyselect helper that expands each alias to every column in its question group. Use it inside any tidyselect context — dplyr::select(), dplyr::across(), tidyr::pivot_longer(cols = ) — and mix it freely with ordinary tidyselect:

select(srv, response_id, starts_with("m1"), aliased("s_race"))

aliased("s_race") pulls in every s_race option-column. A name that is not an alias but is a column falls back to that column; a name that is neither errors with a suggestion.

Usage

aliased(...)

Arguments

...

One or more alias names as strings, e.g. aliased("s_race") or aliased("s_race", "m2_use_cases").

Value

Integer column positions (consumed by tidyselect).

See also

typed() to select by type; get_aliases() to list the available aliases.

Examples

if (FALSE) { # \dontrun{
data("srv_example", package = "g6tr.survey")
x <- srv_example |>
  step_set_mr(matches("^s_racer[0-9]+$"), alias = "s_race")

dplyr::select(x, response_id, aliased("s_race"))
} # }