Summary
Remove dplyr and rlang by replacing all 37 call sites (17 dplyr + 20 rlang) with base R equivalents. This is the largest refactoring phase from the dependency reduction research (#36).
Scope
Not targeted for the next CRAN release. This is a longer-term improvement to pursue after initial CRAN acceptance.
Replacements
| dplyr function |
Base R equivalent |
Call sites |
mutate() |
transform() / df$col <- |
multiple |
case_when() |
ifelse() / vectorized logic |
multiple |
select() / rename() |
bracket indexing + setNames() |
multiple |
left_join() |
merge(x, y, all.x = TRUE) |
multiple |
| `group_by() |
> summarise()` |
aggregate() / tapply() |
all_of() |
character vector indexing |
multiple |
| rlang function |
Base R equivalent |
enquo() / sym() / quo_name() |
match.arg() / string-based column selection |
Design Considerations
- Removing
rlang requires changing the programmatic column selection API pattern from tidy eval to string-based
- This may affect internal (non-exported) function signatures but must NOT change the public API
tibble class output is lost unless another dependency provides it — functions will return data.frame instead
- Consider whether
data.table is a lighter alternative (single dep replacing dplyr+rlang+tibble+tidyr)
Acceptance Criteria
Context
- Research: docs/requirements/dependency-reduction-recommendations.md
- Net result: 10 → 8 explicit Imports (after Phases 1 & 2)
- 7 files affected across R/
Epic
Part of #15 ([Epic A] CRAN Compliance & Release Readiness) — but deferred past initial CRAN submission
Epic
Part of #46 ([Epic E] Dependency Reduction)
Summary
Remove
dplyrandrlangby replacing all 37 call sites (17 dplyr + 20 rlang) with base R equivalents. This is the largest refactoring phase from the dependency reduction research (#36).Scope
Not targeted for the next CRAN release. This is a longer-term improvement to pursue after initial CRAN acceptance.
Replacements
mutate()transform()/df$col <-case_when()ifelse()/ vectorized logicselect()/rename()setNames()left_join()merge(x, y, all.x = TRUE)aggregate()/tapply()all_of()enquo()/sym()/quo_name()match.arg()/ string-based column selectionDesign Considerations
rlangrequires changing the programmatic column selection API pattern from tidy eval to string-basedtibbleclass output is lost unless another dependency provides it — functions will returndata.frameinsteaddata.tableis a lighter alternative (single dep replacing dplyr+rlang+tibble+tidyr)Acceptance Criteria
dplyrremoved from DESCRIPTION Importsrlangremoved from DESCRIPTION ImportsContext
Epic
Part of #15 ([Epic A] CRAN Compliance & Release Readiness) — but deferred past initial CRAN submission
Epic
Part of #46 ([Epic E] Dependency Reduction)