ensure_picks_datasets: Creation of picks object that does not override a dataset if...

View source: R/helpers.R

ensure_picks_datasetsR Documentation

Creation of picks object that does not override a dataset if already exists

Description

[Experimental] Utility function for applying a user-input for variables to the data selected.

Usage

ensure_picks_datasets(datasets = NULL, x, ...)

Arguments

datasets

(datasets() object) to use if x does not already have a dataset.

x

(pick or picks object) to ensure has a dataset.

...

(pick or picks object) that will be appended to the datasets.

Value

a picks object with a dataset, either from x or from datasets and other information added.

Examples

ensure_picks_datasets("ADTTE", x = picks(datasets("ADSL", "ADSL"), variables("SEX")))
ensure_picks_datasets(datasets("ADSL", "ADSL"), x = variables("SEX", "SEX"))
ensure_picks_datasets(datasets("ADSL", "ADSL"),
  x = variables("SEX", "SEX"),
  values(c("F", "M"), "F")
)

teal.picks documentation built on Oct. 9, 2026, 5:07 p.m.