incase

From MaRDI portal
Software:125339



CRANincaseMaRDI QIDQ125339FDOQ125339

Pipe-Friendly Vector Replacement with Case Statements

Alexander Rossell Hayes

Last update: 21 August 2023

Copyright license: MIT license, File License

Software version identifier: 0.3.1, 0.1.0, 0.2.0, 0.2.1, 0.3.0, 0.3.2

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.





This page was built for software: incase