ife: if else

View source: R/utilities.R

ifeR Documentation

if else

Description

A wrapper around ⁠if() else()⁠ to prevent unexpected interactions between ifelse() and factor variables

Usage

ife(x, a, b)

Arguments

x

True / False

a

value to return if True

b

value to return if False

Details

By default ifelse() will convert factor variables to their numeric values which is often undesirable. This connivance function avoids that problem


rbmi documentation built on Nov. 24, 2023, 5:11 p.m.