do_if: Conditionally apply expressions to a data object

View source: R/do_if.R

do_ifR Documentation

Conditionally apply expressions to a data object

Description

Conditionally apply expressions to a data object

Usage

do_if(.data, condition, .then, .else = NULL)

Arguments

.data

Input data

condition

A logical value to determine whether to use .then or .else

.then

Formula or function to apply to input data when condition is TRUE

.else

Formula or function to apply to input data when condition is FALSE; if NULL and condition is FALSE, data is left unchanged

Value

Output of appropriate .then/.else call


pteetor/tutils documentation built on April 25, 2024, 9:14 a.m.