Learn R Programming

admiral (version 1.1.1)

negate_vars: Negate List of Variables

Description

The function adds a minus sign as prefix to each variable.

Usage

negate_vars(vars = NULL)

Value

A list of expressions

Arguments

vars

List of variables created by exprs()

Details

This is useful if a list of variables should be removed from a dataset, e.g., select(!!!negate_vars(by_vars)) removes all by variables.

See Also

Utilities for working with quosures/list of expressions: chr2vars()

Examples

Run this code
negate_vars(exprs(USUBJID, STUDYID))

Run the code above in your browser using DataLab