dq_select_cols: Select default display columns for Data Quality Tables

View source: R/utils_dq.R

dq_select_colsR Documentation

Select default display columns for Data Quality Tables

Description

Select default display columns for Data Quality Tables

Usage

dq_select_cols(
  x,
  ...,
  default = list("UniqueID", "EnrollmentID", `Entry Date` = "EntryDate", "Type", "Issue")
)

Arguments

x

(data.frame) The data frame from which columns will be selected.

...

(columns to select) Columns to select, can be unquoted or quoted.

default

(list or logical) Columns to select as defaults. If 'TRUE', defaults are used. If 'FALSE', no default columns are selected. Can also be a list of column names or expressions.

Value

(data.frame) with selected columns.

Examples

# Selecting columns with default columns
dq_select_cols(data.frame(UniqueID = 1:3, EnrollmentID = 4:6, Issue = letters[1:3], EntryDate = 1:3, Type = 1:3))

# Selecting columns with custom defaults
dq_select_cols(data.frame(UniqueID = 1:3, EnrollmentID = 4:6, Issue = letters[1:3], EntryDate = 1:3, blah = 1:3), default = list("UniqueID", "EntryDate"))

COHHIO/RminorElevated documentation built on Nov. 14, 2024, 6:28 p.m.