Skip to content

incase

0.4.0

Pipe-Friendly Vector Replacement with Case Statements

0packages depend
3.7Kdownloads / year
99.8%test coverage
13/13checks pass

Overview

About
Maintained by Alexander Rossell HayesFirst published 2020-09-157 releasesCRAN page ↗GitHub ↗

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.

Install

Health

CRAN checks
13OK
Slowest check: 1.2 min · r-oldrel-windows-x86_64
Code health
Yes
Tests · ratio 1.62
99.8%
Coverage · measured lines
94%
Documentation · exports
7
Dependencies · direct
Check history
  • OK2026-08-05
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 270 wordsVignettesNopkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
47%
Return-value docs
100%
References docs
0%

Downloads

3.7K
CRAN downloads in the past year
Rank #10,429 · ~10/day · ~307/mo
Daily download trend is not available in this view yet.
22630 days
92790 days
3.7K1 year
Compare downloads with other packages →
Also on97 r2u16 autocran

Repository

Repository
8Stars
0Forks
2Open issues
0Open PRs
7Releases
180Commits
1Contributors
rrstatstidyversemagrittrmagrittr-pipesrecode-values
180 commits · Last activity 2025-10-27 · 0% stars, 30d

Stars over time

2023-11-13 · 72026-07-07 · 8

Repository practices

Upstream repositoryBeta

6 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/rossellhayes/incase on 2026-08-16.

Continuous integration (1)
GitHub Actions
CRAN release process (1)
cran-comments.md
Docs source (1)
README.Rmd
Lint, format, editor (2)
lintrRStudio project
Show all practices
Coverage (1)
.covrignore
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)
Depends (0)
none
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

People & History

People (2)
Maintainer (1)
Author, Maintainer, Copyright holder
Authors (1)
Author, Maintainer, Copyright holder
Contributors (1)
Contributor · added in 0.3.0
Copyright holders (1)
Author, Maintainer, Copyright holder
Package Timeline

7 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.4.0Latest
    2025-07-24 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 0.3.2
    2023-08-21 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • 0.3.1
    2021-06-06 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 0.3.0
    2021-04-03 · diff ↗
  • 0.2.1
    2021-01-14 · diff ↗
  • 0.2.0
    2020-12-17 · diff ↗
  • 0.1.0
    2020-09-15
  • R
    R 4.0.0 released · 2020-04-24

Package metadata

First published
2020-09-15
Total releases
7 / 6 yrs
License
MIT + file LICENSE OSI
Download size
174 KB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("incase")
Rossell Hayes, A., & Kiener, P. (2025). incase: Pipe-Friendly Vector Replacement with Case Statements (Version 0.4.0) [Computer software]. https://doi.org/10.32614/CRAN.package.incase

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for incase version 0.4.0 [Data set]. HJJB, LLC. Data release v2026-08-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy