Vectorised Nested if-else Statements Similar to CASE WHEN in 'SQL'
Overview
Functions for vectorised conditional recoding of variables. case_when() enables you to vectorise multiple if and else statements (like 'CASE WHEN' in 'SQL'). if_else() is a stricter and more predictable version of ifelse() in 'base' that preserves attributes. These functions are forked from 'dplyr' with all package dependencies removed and behave identically to the originals.
- Added
exceeds_tumbling_sum()for checking when a partial cumulative sum
("tumbling sum"") hits a certain threshold value. This is for example useful
for filtering geographic positions by a minimum distance. Thanks to
@klmr for helping me come up with a name.
- Added plain C clones of
dplyr::cumall()anddplyr::cumany()
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 5 (1 internal)includes a package overview page
- Examples that run
- 100%4 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 83%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Dependencies
Installing lest adds no packages beyond those that come with R.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 1.1.0Latest
- RR 3.6.0 released · 2019-04-26
- 1.0.02018-08-16
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2018-08-16
- Total releases
- 2 / 8 yrs
- License
- MIT + file LICENSE OSI
- Download size
- 15 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("lest")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.