Fix dependency declarations: dplyr should be in Imports; abind and reshape2 are unused
- Dominant language
- R
- Stars
- 39
- Forks
- 21
- Avg merge
- 9h 38m
- Merged PRs (30d)
- 2
Description
While reviewing the package, three dependency-declaration issues surfaced:
1. **`dplyr` is in `Suggests` but used unconditionally in package code.** `dplyr::` is called in 13 files in `R/` (e.g. `R/hc.R`, `R/hcp-ma.R`, `R/gof.R`, `R/tidy.R`, `R/glance.R`, `R/plot-cdf.R`, ...). A package whose exported functions call `dplyr::` must declare it in `Imports`; otherwise `R CMD check` flags it and the functions fail at runtime when `dplyr` is not installed. → move `dplyr` to `Imports`.
2. **`abind` is in `Imports` but never used.** The only reference is `#' @importFrom abind abind` in `R/ssdtools-package.R`; `abind()` is never called. → remove `abind` from `Imports` and drop the `@importFrom`.
3. **`reshape2` is in `Suggests` but never used** anywhere in `R/`, `tests/`, or `vignettes/`. `reshape2` is also a superseded/discouraged package. → remove from `Suggests`.
Note: `plyr` is retained — it is genuinely used (`plyr::summarise()` in `R/ggproto.R`). Replacing it has different semantics and is out of scope here.
These are low-risk declaration changes with no change to package behaviour. A PR follows.
Contributor guide
Research direction
Start by reviewing the package dependency declarations and R/ssdtools-package.R, where the abind import is declared. Check the listed R/ files for the dplyr usage and confirm abind and reshape2 have no remaining references. Update Imports and Suggests as described, then run R CMD check to verify the declarations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100