Skip to contents

Set folder for selected columns in a srv_tbl

Usage

step_set_folder(
  x,
  .cols = everything(),
  folder,
  snapshot_data = FALSE,
  status = TRUE
)

Arguments

x

A srv_tbl object

.cols

Columns to set the folder for. Can use tidyselect syntax. Defaults to all columns.

folder

A string representing the folder to set. May be a nested path, e.g. "Module 1/Section A".

snapshot_data

Logical. If TRUE, a snapshot of the data is taken. If FALSE, snapshot without data is taken. If NULL, no snapshot is taken. Defaults to FALSE.

status

Logical. If TRUE, a message is printed to the console indicating how many aliases are left without a folder set. Defaults to TRUE.

Examples

if (FALSE) { # \dontrun{
data("srv_example", package = "g6tr.survey")
x <- srv_example |>
  step_set_loop_sr(contains("m2_yes_no"), alias = "m2_yes_no") |>
  step_set_folder(starts_with("m2"), folder = "m2")

 get_aliases(x)

} # }