incase: Pipe-Friendly Vector Replacement with Case Statements

Offers a pipe-friendly alternative to the 'dplyr' functions case_when() and if_else(), as well as a number of user-friendly simplifications for common use cases. These functions accept a vector as an optional first argument, allowing conditional statements to be built using the 'magrittr' dot operator. The functions also coerce all outputs to the same type, meaning you no longer have to worry about using specific typed variants of NA or explicitly declaring integer outputs, and evaluate outputs somewhat lazily, so you don't waste time on long operations that won't be used.

Version: 0.3.1
Imports: backports, magrittr, plu, rlang
Suggests: covr, crayon, dplyr, nombre, stringi, testthat (≥ 3.0.0), tibble
Published: 2021-06-06
Author: Alexander Rossell Hayes ORCID iD [aut, cre, cph], Patrice Kiener ORCID iD [ctb] (Contributed example for fn_case())
Maintainer: Alexander Rossell Hayes <alexander at>
License: MIT + file LICENSE
NeedsCompilation: no
Materials: README NEWS
CRAN checks: incase results


Reference manual: incase.pdf
Package source: incase_0.3.1.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): incase_0.3.1.tgz, r-release (x86_64): incase_0.3.1.tgz, r-oldrel: incase_0.3.1.tgz
Old sources: incase archive


Please use the canonical form to link to this page.