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.

Package details

AuthorAlexander Rossell Hayes [aut, cre, cph] (<https://orcid.org/0000-0001-9412-0457>), Patrice Kiener [ctb] (Contributed example for fn_case(), <https://orcid.org/0000-0002-0505-9920>)
MaintainerAlexander Rossell Hayes <alexander@rossellhayes.com>
LicenseMIT + file LICENSE
Version0.3.2
URL https://pkg.rossellhayes.com/incase/ https://github.com/rossellhayes/incase
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("incase")

Try the incase package in your browser

Any scripts or data that you put into this service are public.

incase documentation built on Aug. 21, 2023, 9:09 a.m.