Package: incase 0.3.2.9000
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.
Authors:
incase_0.3.2.9000.tar.gz
incase_0.3.2.9000.zip(r-4.5)incase_0.3.2.9000.zip(r-4.4)incase_0.3.2.9000.zip(r-4.3)
incase_0.3.2.9000.tgz(r-4.4-any)incase_0.3.2.9000.tgz(r-4.3-any)
incase_0.3.2.9000.tar.gz(r-4.5-noble)incase_0.3.2.9000.tar.gz(r-4.4-noble)
incase_0.3.2.9000.tgz(r-4.4-emscripten)incase_0.3.2.9000.tgz(r-4.3-emscripten)
incase.pdf |incase.html✨
incase/json (API)
NEWS
# Install 'incase' in R: |
install.packages('incase', repos = c('https://rossellhayes.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/rossellhayes/incase/issues
Pkgdown:https://pkg.rossellhayes.com
magrittrmagrittr-pipesrecode-valuestidyverse
Last updated 5 months agofrom:3cbec4219c. Checks:OK: 5 NOTE: 2. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Dec 07 2024 |
R-4.5-win | NOTE | Dec 07 2024 |
R-4.5-linux | NOTE | Dec 07 2024 |
R-4.4-win | OK | Dec 07 2024 |
R-4.4-mac | OK | Dec 07 2024 |
R-4.3-win | OK | Dec 07 2024 |
R-4.3-mac | OK | Dec 07 2024 |
Exports:%>%fn_casefn_case_fctfn_case_listfn_switch_casefn_switch_case_fctfn_switch_case_listgrep_casegrep_case_fctgrep_case_listif_casein_casein_case_fctin_case_listswitch_caseswitch_case_fctswitch_case_list
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Case statements applying a function to all inputs | fn_case |
Switch-style recoding of values with string pattern matching | grep_case |
Pipe-friendly vectorized if | if_case |
A pipe-friendly general vectorized if | in_case |
Case statements returning a factor | fn_case_fct fn_switch_case_fct grep_case_fct in_case_fct switch_case_fct |
Case statements returning a list | fn_case_list fn_switch_case_list grep_case_list in_case_list switch_case_list |
Switch-style recoding of values | fn_switch_case switch_case |